Last active
November 18, 2022 12:59
-
-
Save brandonpittman/9d15134057c7267a88a8 to your computer and use it in GitHub Desktop.
Toggle spellcheck on/off in vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Toggle spellchecking | |
function! ToggleSpellCheck() | |
set spell! | |
if &spell | |
echo "Spellcheck ON" | |
else | |
echo "Spellcheck OFF" | |
endif | |
endfunction | |
nnoremap <silent> <Leader>S :call ToggleSpellCheck()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works well. I had to bind it to
\c
for some reason\S
would just clear line and insert on that same line.