aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2020-11-15 09:58:29 -0500
committerMitch Riedstra <mitch@riedstra.us>2020-11-15 09:58:45 -0500
commitff2ec5de47d70b329a86cd849b81b565a1a696db (patch)
tree6ec8ed1745434fc1ae3f33de2986f76e9c0ca5ce /vimrc
parent00bcdaf78ee2bd258ec40c0111be8db3399a22bc (diff)
downloaddotfiles-ff2ec5de47d70b329a86cd849b81b565a1a696db.tar.gz
dotfiles-ff2ec5de47d70b329a86cd849b81b565a1a696db.tar.xz
Update basic vimrc and change tabs to spaces
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc64
1 files changed, 41 insertions, 23 deletions
diff --git a/vimrc b/vimrc
index 777b0a0..34d7edc 100644
--- a/vimrc
+++ b/vimrc
@@ -1,38 +1,41 @@
" See the full vim configuration: https://git.riedstra.dev/mitch/vim-cfg/about/
" Basic vimrc for systems you don't want to copy the full one to
-set encoding=utf-8 " The encoding displayed.
-set fileencoding=utf-8 " The encoding written to file.
-set background=dark " Since most terminals I have dark backgrounds
-set nu " Line 'nu'mbers
-set rnu " Realitive line numbering
+set encoding=utf-8 " The encoding displayed.
+set fileencoding=utf-8 " The encoding written to file.
+set background=dark " Since most terminals I have dark backgrounds
+set nu " Line 'nu'mbers
+set rnu " Realitive line numbering
set listchars=tab:▸\ ,eol:¬,trail:• " Listchars are used to show normally
- " invisible chars such as tabs, EOL and
- " trailing whitespace
-" set listchars=tab:\|\ " Alternative listchars w/o special chars.
-set colorcolumn=80 " Sets a "coloured" coloumn to tell you where your line
- " breaks should be so you don't piss off people using
- " a terminal.
-set ic " Case insensitive search by default
-set hls " Highlight my searches by default
-set updatecount=0 " Do not write swap files
-set nocompatible " Don't be compatbile with 'vi'
-set tabstop=4 " Tab width
+ " invisible chars such as tabs, EOL and
+ " trailing whitespace
+" set listchars=tab:\|\ " Alternative listchars w/o special chars.
+set tw=80 " The width in which we break lines with `gq` and such
+set colorcolumn=80 " Sets a "coloured" coloumn to tell you where your line
+ " breaks should be so you don't piss off people using
+ " a terminal.
+set ic " Case insensitive search by default
+set hls " Highlight my searches by default
+set updatecount=0 " Do not write swap files
+set nocompatible " Don't be compatbile with 'vi'
+set tabstop=4 " Tab width
set shiftwidth=4
-set noexpandtab " Do **NOT** turn tabs into spaces by default
+set noexpandtab " Do **NOT** turn tabs into spaces by default
" Be smart about the mouse
set mouse+=a
if &term =~ '^screen'
- " tmux knows the extended mouse mode
- set ttymouse=xterm2
+ " tmux knows the extended mouse mode
+ set ttymouse=xterm2
endif
-syntax on " Syntax highlighting by default
+syntax on " Syntax highlighting by default
-set nomodeline " I know how to setup my editor, I don't need your
- " changes to my vim configuration.
+set nomodeline " I know how to setup my editor, I don't need your
+ " changes to my vim configuration.
" Use \-n in normal mode to toggle line numbers
nmap <leader>n :set invnu<CR>
+" Use \-r in normal mode to toggle relative line numbers
+nmap <leader>r :set invrnu<CR>
" Use \-l in normal mode to toggle listchars
nmap <leader>l :set list!<CR>
@@ -44,8 +47,23 @@ set spell
nnoremap \s ea<C-X><C-S>
set nospell
-" set hidden " This will allow you to change buffers w/o saving
+" set hidden " This will allow you to change buffers w/o saving
" Omni completion, c-x c-o in insert/append mode
" filetype plugin on
" set omnifunc=syntaxcomplete#Complete
+
+
+" Stolen from the help page:
+"
+" One typical way to use the netrw tree display is to: >
+"
+" vim .
+" (use i until a tree display shows)
+" navigate to a file
+" v (edit as desired in vertically split window)
+" ctrl-w h (to return to the netrw listing)
+" P (edit newly selected file in the previous window)
+" ctrl-w h (to return to the netrw listing)
+" P (edit newly selected file in the previous window)
+let g:netrw_liststyle=3