aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-01 20:19:16 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-01 20:19:16 +1200
commit10b821cdabd45ddfe0e771eedae00e520c074e5f (patch)
tree472b91345c3142a9892bc1c40772442c99d92183
parented366f8bafd284afc2f64b4d1b6433c10405389e (diff)
downloaddotfiles-10b821cdabd45ddfe0e771eedae00e520c074e5f.tar.gz
dotfiles-10b821cdabd45ddfe0e771eedae00e520c074e5f.zip
Check for existence of +completeopt
-rw-r--r--vim/vimrc10
1 files changed, 6 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index f55f5549..b78160dd 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -58,10 +58,6 @@ silent! set breakindent
" Clear default 'comments' value, let the filetype handle it
set comments=
-" Add completion options
-set completeopt+=longest " Insert longest common substring
-set completeopt+=menuone " Show the menu even if only one match
-
" Try to keep swapfiles in one system-appropriate dir
set directory^=~/.vim/cache/swap//,~/vimfiles/cache/swap//
@@ -146,6 +142,12 @@ 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