From aaf5d3156774e750d856628a584f0aefb99c57b3 Mon Sep 17 00:00:00 2001 From: "chawley (overlook)" Date: Tue, 15 Apr 2025 13:05:56 -0400 Subject: [PATCH] Reworked Spell Check Section Removed the global nospell autocommands: The lines `autocmd BufRead,BufNewFile * setlocal nospell` and `autocmd BufRead,BufNewFile *.* setlocal nospell` have been removed. These were turning off spell checking for all files. --- .vimrc | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.vimrc b/.vimrc index cd4ab4a..76f4cfb 100644 --- a/.vimrc +++ b/.vimrc @@ -294,38 +294,35 @@ imap =strftime("%Y-%m-%d %a") imap =strftime("%Y-%m-%d") " --------------------------------------------------------------------------------------------------------------------- -" ==> Spellcheck +" ==> Spellcheck -" auto-complete spelling suggestions with +" auto-complete spelling suggestions with set complete+=kspell autocmd FileType markdown setlocal complete+=kspell autocmd FileType text setlocal complete+=kspell autocmd FileType gitcommit setlocal complete+=kspell -" Toggle spell check highlights with +" Toggle spell check highlights with nnoremap :setlocal spell! spelllang=en_us " ==> Spellcheck: only certain file types -" https://robots.thoughtbot.com/vim-spell-checking +" https://robots.thoughtbot.com/vim-spell-checking -" turn off for files with no extension -autocmd BufRead,BufNewFile * setlocal nospell - -" turn off for files with any extension -autocmd BufRead,BufNewFile *.* setlocal nospell - -" turn on for markdown files +" turn on for markdown files autocmd BufRead,BufNewFile *.md setlocal spell -" turn on for text files +" turn on for text files autocmd BufRead,BufNewFile *.txt setlocal spell +" turn on for git commits +autocmd FileType gitcommit setlocal spell spelllang=en_us + " ==> Spellcheck Colors " -" I hate spellcheck's default colors -" (http://stackoverflow.com/questions/6008921/how-do-i-change-the-highlight-style-in-vim-spellcheck) -" Vim Colors: (http://alvinalexander.com/linux/vi-vim-editor-color-scheme-syntax) +" I hate spellcheck's default colors +" (http://stackoverflow.com/questions/6008921/how-do-i-change-the-highlight-style-in-vim-spellcheck) +" Vim Colors: (http://alvinalexander.com/linux/vi-vim-editor-color-scheme-syntax) hi clear SpellBad hi clear SpellCap hi clear SpellLocal