aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-10-11 12:10:50 +0100
committerMatthew Lemon <y@yulqen.org>2023-10-11 12:10:50 +0100
commit7e3f06ef5e0d92a74512bd6f829b9b3e05967e29 (patch)
tree98676bd9d172f542087141ab1506ea37e2f9c609
parentc64dab5d9623f02b00ec2ed15c5cf4aaccf0d1e7 (diff)
Turns on spelling for textfiles
I think this applies to markdown and txt files. Got this from https://dmerej.info/blog/post/syntax-highlighting-is-useless/ Having spelling highlights on the text is cool.
-rw-r--r--vim/vimrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 0481b81..dfb2409 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -356,4 +356,15 @@ nnoremap <leader><C-f> :GitFZF<CR>
" Switching off colours {{{
syntax off
hi Visual term=reverse ctermbg=7 ctermfg=black guifg=black guibg=LightPink
+hi SpellBad term=reverse ctermbg=224 gui=undercurl guisp=Red guibg=Red
+hi SpellCap term=reverse ctermbg=224 gui=undercurl guisp=Red guibg=Red
+hi SpellRare term=reverse ctermbg=224 gui=undercurl guisp=Red guibg=Blue
+
+" }}}
+" Turn spelling on for text files {{{
+" from - https://dmerej.info/blog/post/syntax-highlighting-is-useless/
+augroup textfiles
+ autocmd!
+ autocmd filetype markdown :setlocal spell spelllang=en | syntax clear
+augroup end
" }}}