aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-02 14:26:38 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-02 14:26:38 +1300
commit7055ff62f078dad446c4192ab3d98f16ed82caeb (patch)
tree9e517a03839ca7cceb6895037fafa9aea38bf58e /vim/plugin
parentMake bigfile 'synmaxcol' setting configurable (diff)
downloaddotfiles-7055ff62f078dad446c4192ab3d98f16ed82caeb.tar.gz
dotfiles-7055ff62f078dad446c4192ab3d98f16ed82caeb.zip
Have bigfileturn local syntax off (configurably)
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/bigfile.vim10
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