aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/big_file_options.vim
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/plugin/big_file_options.vim
parent3e29d5a95693a5ffd5e78622f560f415743b0736 (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/plugin/big_file_options.vim')
-rw-r--r--vim/plugin/big_file_options.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/plugin/big_file_options.vim b/vim/plugin/big_file_options.vim
index bbbedc96..cdced67d 100644
--- a/vim/plugin/big_file_options.vim
+++ b/vim/plugin/big_file_options.vim
@@ -44,7 +44,7 @@ function! s:BigFileOptions()
endif
" Limit the number of columns of syntax highlighting
- if exists('&synmaxcol')
+ if exists('+synmaxcol')
\ && &synmaxcol > g:big_file_synmaxcol
execute 'setlocal synmaxcol=' . g:big_file_synmaxcol
endif