diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-19 17:20:01 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-19 17:20:01 +1300 |
commit | 5f3b58d62ca9e348468f1ce622e86badbd5d6e8f (patch) | |
tree | f2d81aaa586d379f0998a6a02e34ec8a2997bf19 /vim/plugin/spellfile_local.vim | |
parent | Merge branch 'release/v8.6.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-8.7.0.tar.gz (sig) dotfiles-8.7.0.zip |
Merge branch 'release/v8.7.0'v8.7.0
* release/v8.7.0:
Overhaul spellfile_local.vim plugin
Remove complex 'spellfile' setting
Comment and clean up new Vim configuration
Diffstat (limited to 'vim/plugin/spellfile_local.vim')
-rw-r--r-- | vim/plugin/spellfile_local.vim | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/vim/plugin/spellfile_local.vim b/vim/plugin/spellfile_local.vim index f6918bfb..07307754 100644 --- a/vim/plugin/spellfile_local.vim +++ b/vim/plugin/spellfile_local.vim @@ -1,12 +1,20 @@ +" +" spellfile_local.vim: Set extra 'spellfile' elements for full file paths and +" filetype, to give the option of adding to file-specific or filetype-specific +" spelling word lists. +" +" Author: Tom Ryder <tom@sanctum.geek.nz> +" License: Same as Vim itself +" if exists('loaded_spellfile_local') || &compatible finish endif let loaded_spellfile_local = 1 -command! -bar SetLocalSpellFiles - \ call spellfile_local#() - +" For various events involving establishing or renaming a file buffer or +" changing its filetype, rebuild the 'spellfile' definition accordingly +" augroup spellfile_local - autocmd BufNew,BufRead * - \ SetLocalSpellFiles + autocmd BufFilePost,BufNewFile,BufRead,EncodingChanged,FileType * + \ call spellfile_local#() augroup END |