aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-24 11:30:18 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-24 11:30:18 +1200
commitc36d4090c66bbaee373fd51221f266a5bd322680 (patch)
tree48fb0c8b449a1c5770f13ae16835eca9cac843a1 /vim/vimrc
parentMerge branch 'release/v6.43.0' into develop (diff)
downloaddotfiles-c36d4090c66bbaee373fd51221f266a5bd322680.tar.gz
dotfiles-c36d4090c66bbaee373fd51221f266a5bd322680.zip
Add two-spacers definition for 'spellcapcheck'
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc14
1 files changed, 14 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index e88fe8b0..8cef812f 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -411,6 +411,20 @@ let &spellfile = $MYVIM.'/cache/spell/'.join([
\,'add'
\], '.')
+" Spell checking includes optional support for catching lowercase letters at
+" the start of sentences, and defines a pattern in 'spellcapcheck' for the end
+" of a sentence. The default is pretty good, but with two-spacing with
+" 'cpoptions' including 'J' and 'formatoptions' including 'p' as set later in
+" this file, we can be less ambiguous in this pattern. We requre two
+" consecutive spaces, a newline, a carriage return, or a tab to mark the end
+" of a sentence. This means that we could make abbreviations like "i.e.
+" something" without flatting "something" as a spelling error.
+"
+" We use :let syntax rather than :set here, just to avoid a whole bunch of
+" annoying escaping for the value.
+"
+let &spellcapcheck = '[.?!]\%( \|[\n\r\t])'
+
" 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,