diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-02 14:26:38 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-02 14:26:38 +1300 |
commit | 7055ff62f078dad446c4192ab3d98f16ed82caeb (patch) | |
tree | 9e517a03839ca7cceb6895037fafa9aea38bf58e | |
parent | Make bigfile 'synmaxcol' setting configurable (diff) | |
download | dotfiles-7055ff62f078dad446c4192ab3d98f16ed82caeb.tar.gz dotfiles-7055ff62f078dad446c4192ab3d98f16ed82caeb.zip |
Have bigfileturn local syntax off (configurably)
-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 |