blob: c026d626dc4e1b45b4a52d3865f4ea0b782515e3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
if exists('loaded_spellfile_local')
finish
endif
let loaded_spellfile_local = 1
let s:spellfile = join([
\ substitute(v:lang, '_.*', '', ''),
\ &encoding
\ ], '.') . '.add'
Establish $MYVIM/cache/spell
execute 'set spellfile=$MYVIM/cache/spell/'.s:spellfile
command! -bar AddLocalSpellFile
\ call spellfile_local#()
augroup spellfile_local
autocmd BufNew,BufRead *
\ AddLocalSpellFile
augroup END
|