diff options
Diffstat (limited to 'vim/plugin')
-rw-r--r-- | vim/plugin/bigfile.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vim/plugin/bigfile.vim b/vim/plugin/bigfile.vim index c5dee62a..fece3d9b 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 + " Default to leaving syntax highlighting off + if !exists('g:bigfile_syntax') + let g:bigfile_syntax = 0 + endif + " Cut 'synmaxcol' down to this or smaller for big files if !exists('g:bigfile_size_synmaxcol') let g:bigfile_size_synmaxcol = 256 @@ -39,6 +44,11 @@ if has('eval') && has('autocmd') execute 'setlocal synmaxcol=' . g:bigfile_size_synmaxcol endif + " Disable syntax highlighting if configured to do so + if !g:bigfile_syntax + setlocal syntax=OFF + endif + endfunction " Define autocmd for calling to check filesize |