Browse Source

added spelling hotkey

Josh Bicking 8 years ago
parent
commit
e00f88a4ba
1 changed files with 11 additions and 0 deletions
  1. 11 0
      vimrc

+ 11 - 0
vimrc

@@ -152,6 +152,17 @@ endif
 " <Leader>l formats a line
 noremap <Leader>l Vgq
 
+" <Leader>s toggles spelling
+function! SpellToggle()
+    if(&spell == 1)
+        setlocal nospell
+    else
+        setlocal spell spelllang=en_us
+    endif
+endfunc
+
+nnoremap <Leader>s :call SpellToggle()<CR>
+
 
 """ Plugins