diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-10-27 02:14:14 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-10-27 03:45:26 -0400 |
commit | 251d5b27a1e58b52e6304dd8e0059bb234fa23c1 (patch) | |
tree | 3aeb704845c360d2cb89b06178c6f7961c57df5b | |
parent | 8c08a76cc112cd21233551ddb515a9b3175a5416 (diff) | |
download | conf-251d5b27a1e58b52e6304dd8e0059bb234fa23c1.tar.gz conf-251d5b27a1e58b52e6304dd8e0059bb234fa23c1.zip |
simpler spellcheck toggle
-rw-r--r-- | vimrc | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -97,17 +97,8 @@ xnoremap > >gv noremap <silent>M :<C-u>make<CR><CR><C-W>k " }}} " F11 for spell checking {{{ -function! s:spell() - if !exists("s:spell_check") || s:spell_check == 0 - let s:spell_check = 1 - setlocal spell spelllang=en_us - else - let s:spell_check = 0 - setlocal spell spelllang= - endif -endfunction -noremap <silent><F11> :<C-u>call <SID>spell()<CR> -inoremap <silent><F11> <C-o>:call <SID>spell()<CR> +noremap <silent><expr><F11> &spell ? ":\<C-u>setlocal nospell\<CR>" : ":\<C-u>setlocal spell\<CR>" +inoremap <silent><expr><F11> &spell ? "\<C-o>:setlocal nospell\<CR>" : "\<C-o>:setlocal spell\<CR>" " }}} " arrow keys {{{ noremap <up> gk |