aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-11 09:51:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-11 09:51:15 +1200
commit90ffd5eb85cf4c46db27f8cc4bb6df3d088fe81d (patch)
tree8ad3b965a69783be1d71d5685a3c97f9cd8d0522
parentFactor our :AddLocalSpellFile command (diff)
downloaddotfiles-90ffd5eb85cf4c46db27f8cc4bb6df3d088fe81d.tar.gz
dotfiles-90ffd5eb85cf4c46db27f8cc4bb6df3d088fe81d.zip
Use dedicated augroup for local spellfile
-rw-r--r--vim/plugin/spellfile_local.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/vim/plugin/spellfile_local.vim b/vim/plugin/spellfile_local.vim
index b5db4518..285618f8 100644
--- a/vim/plugin/spellfile_local.vim
+++ b/vim/plugin/spellfile_local.vim
@@ -23,7 +23,11 @@ function! AddLocalSpellfile() abort
execute 'setlocal spellfile+=$MYVIM/cache/spell/local/'.spellfile
nnoremap <buffer> zG 2zg
endfunction
-autocmd vimrc BufRead *
command! AddLocalSpellFile
\ call AddLocalSpellFile()
+
+augroup spellfile_local
+ autocmd BufRead *
+ \ AddLocalSpellfile
+augroup END