aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/spellfile_local.vim
blob: 07307754979b67def782d9bd0369d04a92d54b10 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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

" For various events involving establishing or renaming a file buffer or
" changing its filetype, rebuild the 'spellfile' definition accordingly
"
augroup spellfile_local
  autocmd BufFilePost,BufNewFile,BufRead,EncodingChanged,FileType *
        \ call spellfile_local#()
augroup END