diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-17 00:47:52 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-17 00:47:52 +1200 |
commit | 13d56da45a47f73b55aa5544aafe68d36774b51d (patch) | |
tree | 67507f0f7862fa639c8f5eb93e7410b879405ac6 /vim/vimrc | |
parent | Refactor select_old_files.vim to allow count (diff) | |
download | dotfiles-13d56da45a47f73b55aa5544aafe68d36774b51d.tar.gz dotfiles-13d56da45a47f73b55aa5544aafe68d36774b51d.zip |
Overhaul local Vim spellfile word list plugin
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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, |