diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-01-06 13:26:57 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-01-06 13:26:57 +1300 |
commit | 6efb129e75f0d7e79d6bfc38b14a5d9a74b94df5 (patch) | |
tree | d84a8177c83d4a49c945652a7935edd2cf3c947c | |
parent | Merge branch 'hotfix/v0.1.1' (diff) | |
download | vim-spellfile-local-6efb129e75f0d7e79d6bfc38b14a5d9a74b94df5.tar.gz vim-spellfile-local-6efb129e75f0d7e79d6bfc38b14a5d9a74b94df5.zip |
Add buffer-local maps for internal wordlist
Optional depending on the setting of g:spellfile_local_remap_internal.
-rw-r--r-- | autoload/spellfile_local.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/autoload/spellfile_local.vim b/autoload/spellfile_local.vim index 7d1877e..1b8aa38 100644 --- a/autoload/spellfile_local.vim +++ b/autoload/spellfile_local.vim @@ -67,6 +67,19 @@ function! spellfile_local#() abort " Set the spellfile path list to the concatenated list let &spellfile = s:OptionJoin(spellfiles) + " Remap the internal word list mappings to use the second entry in + " the new local 'spellfile' + if get(g:, 'spellfile_local_remap_internal', 1) + nnoremap zG 2zg + xnoremap zG 2zg + nnoremap zW 2zw + xnoremap zW 2zw + nnoremap zuG 2zug + xnoremap zuG 2zug + nnoremap zuW 2zuw + xnoremap zuW 2zuw + endif + endfunction " Escape a path for use as a valid spelling file name; replace any characters |