From 7055ff62f078dad446c4192ab3d98f16ed82caeb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 2 Nov 2017 14:26:38 +1300 Subject: Have bigfileturn local syntax off (configurably) --- vim/plugin/bigfile.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3