aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-16 12:50:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-16 12:50:15 +1200
commitbc97c06effedd53ec5e18920bdc8dd6a06c74d92 (patch)
tree7a2c5d58e01e7d0d2028e9f8d148900e53be5961
parentRemove Unix 'backupskip' parts if not running Unix (diff)
downloaddotfiles-bc97c06effedd53ec5e18920bdc8dd6a06c74d92.tar.gz
dotfiles-bc97c06effedd53ec5e18920bdc8dd6a06c74d92.zip
Reorder .vimrc a bit
-rw-r--r--vim/vimrc54
1 files changed, 27 insertions, 27 deletions
diff --git a/vim/vimrc b/vim/vimrc
index f4cb5171..e28aa00c 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -66,6 +66,12 @@ silent! set breakindent
" Clear default 'comments' value, let the filetype handle it
set comments=
+" Add completion options
+if exists('+completeopt')
+ set completeopt+=longest " Insert longest common substring
+ set completeopt+=menuone " Show the menu even if only one match
+endif
+
" Give me a prompt instead of just rejecting risky :write, :saveas
set confirm
@@ -91,6 +97,12 @@ endif
" Don't wait for a key after Escape in insert mode
silent! set noesckeys
+" Fold based on indent, but only when I ask
+if has('folding')
+ set foldlevelstart=99
+ set foldmethod=indent
+endif
+
" Delete comment leaders when joining lines, if supported
silent! set formatoptions+=j
@@ -99,6 +111,11 @@ if system('grep --version') =~# '^grep (GNU grep)'
set grepprg=grep\ -HnRs\ --exclude='.git*'
endif
+" Don't load GUI menus; set here before GUI starts
+if has('gui_running')
+ set guioptions+=M
+endif
+
" Allow buffers to have changes without being displayed
set hidden
@@ -143,6 +160,12 @@ set nrformats-=octal
set path-=/usr/include " Let the C/C++ filetypes set that
set path+=** " Search current directory's whole tree
+" Make sessions usable
+if exists('+sessionoptions')
+ set sessionoptions-=localoptions " No buffer options or mappings
+ set sessionoptions-=options " No global options or mappings
+endif
+
" Don't show startup splash screen (I donated)
set shortmess+=I
@@ -159,28 +182,6 @@ set timeoutlen=3000
" No terminal mouse, even if we could
silent! set ttymouse=
-" Wildmenu settings; see also plugin/wildignore.vim
-set wildmenu " Use wildmenu
-set wildmode=list:longest " Tab press completes and lists
-silent! set wildignorecase " Case insensitive, if supported
-
-" Add completion options
-if exists('+completeopt')
- set completeopt+=longest " Insert longest common substring
- set completeopt+=menuone " Show the menu even if only one match
-endif
-
-" Fold based on indent, but only when I ask
-if has('folding')
- set foldlevelstart=99
- set foldmethod=indent
-endif
-
-" Don't load GUI menus; set here before GUI starts
-if has('gui_running')
- set guioptions+=M
-endif
-
" Keep undo files, hopefully in a dedicated directory
if has('persistent_undo')
set undofile
@@ -191,11 +192,10 @@ if has('persistent_undo')
endif
endif
-" Make sessions usable
-if exists('+sessionoptions')
- set sessionoptions-=localoptions " No buffer options or mappings
- set sessionoptions-=options " No global options or mappings
-endif
+" Wildmenu settings; see also plugin/wildignore.vim
+set wildmenu " Use wildmenu
+set wildmode=list:longest " Tab press completes and lists
+silent! set wildignorecase " Case insensitive, if supported
" Let me move beyond buffer text in visual block mode
if exists('+virtualedit')