diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 17:25:08 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 17:31:52 +1200 |
commit | a3d575f4db69123dbad6c59faf8ba6185e4b0091 (patch) | |
tree | 67d165e3a7bc5563b18404083310a73617e2c2b0 | |
parent | Remove redundant option existence check (diff) | |
download | vim-big-file-options-a3d575f4db69123dbad6c59faf8ba6185e4b0091.tar.gz vim-big-file-options-a3d575f4db69123dbad6c59faf8ba6185e4b0091.zip |
Remove syntax feature check
-rw-r--r-- | autoload/big_file_options.vim | 25 | ||||
-rw-r--r-- | doc/big_file_options.txt | 3 |
2 files changed, 10 insertions, 18 deletions
diff --git a/autoload/big_file_options.vim b/autoload/big_file_options.vim index 023c672..4d65bd4 100644 --- a/autoload/big_file_options.vim +++ b/autoload/big_file_options.vim @@ -79,23 +79,16 @@ function! s:SetPost() abort " Force filetype off setlocal filetype=NONE - " Syntax features - if has('syntax') - - " Disable syntax highlighting if configured - let syntax = get(g:, 'big_file_options_syntax', 0) - if !syntax - setlocal syntax=OFF - endif - - " Force maximum syntax columns down if configured - if exists('+synmaxcol') - let synmaxcol = get(g:, 'big_file_options_synmaxcol', 256) - if &synmaxcol > synmaxcol - let &l:synmaxcol = synmaxcol - endif - endif + " Disable syntax highlighting if configured + let syntax = get(g:, 'big_file_options_syntax', 0) + if !syntax + setlocal syntax=OFF + endif + " Force maximum syntax columns down if configured + let synmaxcol = get(g:, 'big_file_options_synmaxcol', 256) + if &synmaxcol > synmaxcol + let &l:synmaxcol = synmaxcol endif " Tell the user what we've done diff --git a/doc/big_file_options.txt b/doc/big_file_options.txt index 799f659..713a6bc 100644 --- a/doc/big_file_options.txt +++ b/doc/big_file_options.txt @@ -40,8 +40,7 @@ to disable syntax highlighting completely on large files; this defaults to on. *g:big_file_options_synmaxcol* Set `g:big_file_options_synmaxcol` to the number of columns for which syntax highlighting should be done on big files, assuming |g:big_file_options_syntax| -is enabled. This defaults to 256, and only works if you have the |+synmaxcol| -feature. +is enabled. This defaults to 256. AUTHOR *big_file_options-author* |