From 13d56da45a47f73b55aa5544aafe68d36774b51d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 17 Jun 2019 00:47:52 +1200 Subject: Overhaul local Vim spellfile word list plugin --- vim/plugin/spellfile_local.vim | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'vim/plugin/spellfile_local.vim') diff --git a/vim/plugin/spellfile_local.vim b/vim/plugin/spellfile_local.vim index c026d626..f6918bfb 100644 --- a/vim/plugin/spellfile_local.vim +++ b/vim/plugin/spellfile_local.vim @@ -1,19 +1,12 @@ -if exists('loaded_spellfile_local') +if exists('loaded_spellfile_local') || &compatible 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 +command! -bar SetLocalSpellFiles \ call spellfile_local#() augroup spellfile_local autocmd BufNew,BufRead * - \ AddLocalSpellFile + \ SetLocalSpellFiles augroup END -- cgit v1.2.3