diff options
Diffstat (limited to 'vim/plugin/bigfile.vim')
-rw-r--r-- | vim/plugin/bigfile.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vim/plugin/bigfile.vim b/vim/plugin/bigfile.vim index 82d1a7dd..c5dee62a 100644 --- a/vim/plugin/bigfile.vim +++ b/vim/plugin/bigfile.vim @@ -13,6 +13,11 @@ if has('eval') && has('autocmd') let g:bigfile_size = 10 * 1024 * 1024 endif + " Cut 'synmaxcol' down to this or smaller for big files + if !exists('g:bigfile_size_synmaxcol') + let g:bigfile_size_synmaxcol = 256 + endif + " Declare function for turning off slow options function! s:BigFileOptions(name, size) @@ -30,8 +35,8 @@ if has('eval') && has('autocmd') endif " Limit the number of columns of syntax highlighting - if exists('&synmaxcol') - setlocal synmaxcol=256 + if exists('&synmaxcol') && &synmaxcol > g:bigfile_size_synmaxcol + execute 'setlocal synmaxcol=' . g:bigfile_size_synmaxcol endif endfunction |