From 080a0802d95ce3d89a4cfd9dded76d11b3092e88 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 2 Nov 2017 14:13:32 +1300 Subject: Make bigfile size variable an option with default This arranges for g:big_file_size only to set itself to 10 MiB if the variable is not already set, presumably by the user in their vimrc. --- vim/plugin/bigfile.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vim/plugin') diff --git a/vim/plugin/bigfile.vim b/vim/plugin/bigfile.vim index d1d9ca61..7f28c539 100644 --- a/vim/plugin/bigfile.vim +++ b/vim/plugin/bigfile.vim @@ -8,8 +8,10 @@ " if has('eval') && has('autocmd') - " Threshold is 10 MiB - let g:big_file_size = 10 * 1024 * 1024 + " Default threshold is 10 MiB + if !exists('g:big_file_size') + let g:big_file_size = 10 * 1024 * 1024 + endif " Declare function for turning off slow options function! s:BigFileMeasures() -- cgit v1.2.3