aboutsummaryrefslogtreecommitdiff
path: root/vim/config
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-02 14:30:02 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-02 14:30:02 +1300
commitd3fe457b0ea8400e79bcd54c6c803870921d1b9e (patch)
tree52e9f6e6b3dc1ebd624ee2249b4ea01dcfd8ffae /vim/config
parentMerge branch 'feature/options-audit' into develop (diff)
parentHave bigfileturn local syntax off (configurably) (diff)
downloaddotfiles-d3fe457b0ea8400e79bcd54c6c803870921d1b9e.tar.gz
dotfiles-d3fe457b0ea8400e79bcd54c6c803870921d1b9e.zip
Merge branch 'feature/vim-plugin' into develop
* feature/vim-plugin: Have bigfileturn local syntax off (configurably) Make bigfile 'synmaxcol' setting configurable Refactor plugin function for dependency injection Rename variable and autocmd to use plugin prefix Make bigfile size variable an option with default Expand comment header for bigfile.vim Move Vim big file options config into plugin
Diffstat (limited to 'vim/config')
-rw-r--r--vim/config/bigfile.vim28
1 files changed, 0 insertions, 28 deletions
diff --git a/vim/config/bigfile.vim b/vim/config/bigfile.vim
deleted file mode 100644
index 5c68b1a7..00000000
--- a/vim/config/bigfile.vim
+++ /dev/null
@@ -1,28 +0,0 @@
-" When opening a large file, take some measures to keep things loading quickly
-if has('eval') && has('autocmd')
-
- " Threshold is 10 MiB
- let g:big_file_size = 10 * 1024 * 1024
-
- " Declare function for turning off slow options
- function! s:BigFileMeasures()
- let l:file = expand('<afile>')
- if getfsize(l:file) > g:big_file_size
- setlocal nobackup
- setlocal nowritebackup
- setlocal noswapfile
- if has('persistent_undo')
- setlocal noundofile
- endif
- if exists('&synmaxcol')
- setlocal synmaxcol=256
- endif
- endif
- endfunction
-
- " Define autocmd for calling to check filesize
- augroup dotfiles_big_file_measures
- autocmd!
- autocmd BufReadPre * call s:BigFileMeasures()
- augroup end
-endif