summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-10-27 02:14:14 -0400
committerJesse Luehrs <doy@tozt.net>2017-10-27 03:45:26 -0400
commit251d5b27a1e58b52e6304dd8e0059bb234fa23c1 (patch)
tree3aeb704845c360d2cb89b06178c6f7961c57df5b /vimrc
parent8c08a76cc112cd21233551ddb515a9b3175a5416 (diff)
downloadconf-251d5b27a1e58b52e6304dd8e0059bb234fa23c1.tar.gz
conf-251d5b27a1e58b52e6304dd8e0059bb234fa23c1.zip
simpler spellcheck toggle
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc13
1 files changed, 2 insertions, 11 deletions
diff --git a/vimrc b/vimrc
index 2c1f9e4..543924b 100644
--- a/vimrc
+++ b/vimrc
@@ -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