diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-04 02:02:36 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-04 02:02:36 +1300 |
commit | 17d0781bb4d6eb12f79729f36b09e55bae7391a2 (patch) | |
tree | 6c967112bc2632360eb147ce8a91254c17f401aa | |
parent | Move trailing space strip config into plugin (diff) | |
download | dotfiles-17d0781bb4d6eb12f79729f36b09e55bae7391a2.tar.gz dotfiles-17d0781bb4d6eb12f79729f36b09e55bae7391a2.zip |
Rename bigfile plugin to big_file
Just for consistency with the other plugins I'm making.
I don't think I really like the cutesy names given to Vim plugins. I
prefer the slightly longer and maybe even namespaced names like Perl
distributions and modules have. Let's see how well this works.
-rw-r--r-- | vim/doc/big_file.txt (renamed from vim/doc/bigfile.txt) | 2 | ||||
-rw-r--r-- | vim/plugin/big_file.vim (renamed from vim/plugin/bigfile.vim) | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/vim/doc/bigfile.txt b/vim/doc/big_file.txt index d7e56f28..aea0ee79 100644 --- a/vim/doc/bigfile.txt +++ b/vim/doc/big_file.txt @@ -1,4 +1,4 @@ -*bigfile.txt* Disable slow options for big files to speed things up +*big_file.txt* Disable slow options for big files to speed things up Author: Tom Ryder <tom@sanctum.geek.nz> License: Same terms as Vim itself (see |license|) diff --git a/vim/plugin/bigfile.vim b/vim/plugin/big_file.vim index fece3d9b..4c07d7c3 100644 --- a/vim/plugin/bigfile.vim +++ b/vim/plugin/big_file.vim @@ -1,5 +1,5 @@ " -" bigfile.vim: When opening a large file, take some measures to keep things +" big_file.vim: When opening a large file, take some measures to keep things " loading quickly. " " Author: Tom Ryder <tom@sanctum.geek.nz> @@ -9,18 +9,18 @@ if has('eval') && has('autocmd') " Default threshold is 10 MiB - if !exists('g:bigfile_size') - let g:bigfile_size = 10 * 1024 * 1024 + if !exists('g:big_file_size') + let g:big_file_size = 10 * 1024 * 1024 endif " Default to leaving syntax highlighting off - if !exists('g:bigfile_syntax') - let g:bigfile_syntax = 0 + if !exists('g:big_file_syntax') + let g:big_file_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 + if !exists('g:big_file_size_synmaxcol') + let g:big_file_size_synmaxcol = 256 endif " Declare function for turning off slow options @@ -40,21 +40,21 @@ if has('eval') && has('autocmd') endif " Limit the number of columns of syntax highlighting - if exists('&synmaxcol') && &synmaxcol > g:bigfile_size_synmaxcol - execute 'setlocal synmaxcol=' . g:bigfile_size_synmaxcol + if exists('&synmaxcol') && &synmaxcol > g:big_file_size_synmaxcol + execute 'setlocal synmaxcol=' . g:big_file_size_synmaxcol endif " Disable syntax highlighting if configured to do so - if !g:bigfile_syntax + if !g:big_file_syntax setlocal syntax=OFF endif endfunction " Define autocmd for calling to check filesize - augroup bigfile_options_bufreadpre + augroup big_file_options_bufreadpre autocmd! - autocmd BufReadPre * call s:BigFileOptions(expand('<afile>'), g:bigfile_size) + autocmd BufReadPre * call s:BigFileOptions(expand('<afile>'), g:big_file_size) augroup end endif |