diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-07-06 23:23:01 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-07-06 23:28:46 +1200 |
commit | a1a3038c30a37471a1b912df98a769c090b4f3a2 (patch) | |
tree | 554a605e7c61e438febe1993f272c53bb6a41f56 /vim/vimrc | |
parent | Add case sensitivity flag to needed opers (diff) | |
download | dotfiles-a1a3038c30a37471a1b912df98a769c090b4f3a2.tar.gz dotfiles-a1a3038c30a37471a1b912df98a769c090b4f3a2.zip |
Revert to simpler spelling approach
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -363,10 +363,11 @@ endif " since Vim uses it internally for 'spellfile' assignment to decide whether " the path is valid. We put it back immediately afterwards. " -set spelllang^=en_nz +set spelllang=en_nz CreatePath $MYVIM/spell +let s:spelllang = split#Option(&spelllang) let s:spellfile = $MYVIM.'/spell/'.join([ - \ split(split#Option(&spelllang)[0], '_')[0], + \ split(s:spelllang[0], '_')[0], \ &encoding, \ 'add', \], '.') @@ -376,6 +377,7 @@ if has('unix') endif execute 'set spellfile^='.escape#Arg(escape#Item(s:spellfile)) let &isfname = s:isfname +unlet s:isfname " Spell checking includes optional support for catching lower case letters at " the start of sentences, and defines a pattern in 'spellcapcheck' for the end @@ -1357,10 +1359,10 @@ nnoremap <Leader>f " excluding or including the ‘u’ in words like 'favourite', depending on the " target audience. I generally use US English for international audiences. " -nnoremap <Leader>u - \ :<C-U>set spelllang-=en_nz spelllang^=en_us spelllang?<CR> nnoremap <Leader>z - \ :<C-U>set spelllang-=en_us spelllang^=en_nz spelllang?<CR> + \ :<C-U>set spelllang=en_nz +nnoremap <Leader>u + \ :<C-U>set spelllang=en_us " The next mapping is also for toggling an option, but it’s more complicated; " it uses a simple plugin of mine called copy_linebreak.vim to manage several |