aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-17 00:47:52 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-17 00:47:52 +1200
commit13d56da45a47f73b55aa5544aafe68d36774b51d (patch)
tree67507f0f7862fa639c8f5eb93e7410b879405ac6 /vim/vimrc
parentRefactor select_old_files.vim to allow count (diff)
downloaddotfiles-13d56da45a47f73b55aa5544aafe68d36774b51d.tar.gz
dotfiles-13d56da45a47f73b55aa5544aafe68d36774b51d.zip
Overhaul local Vim spellfile word list plugin
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc16
1 files changed, 16 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 7f2d9ae8..dc9430e1 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -398,6 +398,22 @@ if has('persistent_undo')
set undodir^=$MYVIM/cache/undo//
endif
+" For spelling, use New Zealand English by default, but later on we'll
+" configure a leader mapping to switch to United States English, since I so
+" often have to write for Yankees. We'll set the 'spellfile' option too, to
+" place it in the cache directory into which we've been putting everything.
+" We'll follow Vim's standard naming convention for the file itself, though.
+" If available, my plugin spellfile_local.vim will extend this later to add
+" more spelling word lists per filetype and per file.
+"
+set spelllang=en_nz
+Establish $MYVIM/cache/spell
+let &spellfile = $MYVIM.'/cache/spell/'.join([
+ \ substitute(&spelllang, '_.*', '', '')
+ \,&encoding
+ \,'add'
+ \], '.')
+
" For word completion in insert mode with CTRL-X CTRL-K, or if 'complete'
" includes the 'k' flag, the 'dictionary' option specifies the path to the
" system word list. This makes the dictionary completion work consistently,