aboutsummaryrefslogtreecommitdiff
path: root/vim/config
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-10 21:54:42 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-10 21:54:42 +1300
commit8b79ec9365491f8fb2bd48452b6aca68d2b673d2 (patch)
treef56dd3b1c7249b49ef73dfc9eb23e1ab78bb7ab9 /vim/config
parentAdjust some whitespace and comment layout (diff)
downloaddotfiles-8b79ec9365491f8fb2bd48452b6aca68d2b673d2.tar.gz
dotfiles-8b79ec9365491f8fb2bd48452b6aca68d2b673d2.zip
Use exists+ test rather than exists&
From :help hidden-options: >Not all options are supported in all versions. This depends on the >supported features and sometimes on the system. A remark about this is >in curly braces below. When an option is not supported it may still be >set without getting an error, this is called a hidden option. You can't >get the value of a hidden option though, it is not stored. > >To test if option "foo" can be used with ":set" use something like this: > if exists('&foo') >This also returns true for a hidden option. To test if option "foo" is >really supported use something like this: > if exists('+foo')
Diffstat (limited to 'vim/config')
-rw-r--r--vim/config/completion.vim2
-rw-r--r--vim/config/windows.vim2
-rw-r--r--vim/config/wrap.vim2
3 files changed, 3 insertions, 3 deletions
diff --git a/vim/config/completion.vim b/vim/config/completion.vim
index 854ffea7..a8a5c201 100644
--- a/vim/config/completion.vim
+++ b/vim/config/completion.vim
@@ -21,7 +21,7 @@ if has('wildmenu')
endif
" Complete files without case sensitivity, if the option is available
- if exists('&wildignorecase')
+ if exists('+wildignorecase')
set wildignorecase
endif
diff --git a/vim/config/windows.vim b/vim/config/windows.vim
index a0492c76..88b38f8c 100644
--- a/vim/config/windows.vim
+++ b/vim/config/windows.vim
@@ -16,7 +16,7 @@ if has('windows')
endif
" Only show the tab bar if there's more than one tab
- if exists('&showtabline')
+ if exists('+showtabline')
set showtabline=1
endif
diff --git a/vim/config/wrap.vim b/vim/config/wrap.vim
index 8c7829ba..a90c2765 100644
--- a/vim/config/wrap.vim
+++ b/vim/config/wrap.vim
@@ -30,7 +30,7 @@ if has('linebreak')
set showbreak=...
" If we have the option, indent wrapped lines as much as the first line
- if has('&breakindent')
+ if exists('+breakindent')
set breakindent
endif