From 5008fe3e2dfde059aec1a3241c46a99024bec0d2 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 16 Dec 2024 11:14:59 +0100 Subject: [PATCH] etc/vim/source/spell.vim --- etc/vim/source/spell.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/vim/source/spell.vim b/etc/vim/source/spell.vim index 4f452eb1..5d46558e 100644 --- a/etc/vim/source/spell.vim +++ b/etc/vim/source/spell.vim @@ -1,7 +1,13 @@ set spell " Disable spell checking for code +"echo ">>" . &filetype +autocmd BufRead,BufNewFile * if &filetype == "" && expand('%:e') !~ 'mail' | setlocal nospell | endif +" autocmd BufReadPost * if expand('%:e') =~ 'txt\|md\|markdown' | setlocal spell | else | setlocal nospell | endif +"autocmd BufRead,BufNewFile * if &filetype != "" | echo "SPELL" | endif +"autocmd FileType * if &filetype == "" | setlocal nospell | endif autocmd FileType sh,perl,php,vim,python,c,cpp,java,javascript setlocal nospell "autocmd FileType sh syntax match Comment /\v#.*/ contains=@Spell "autocmd FileType sh syntax region Comment start=/^#/ end=/^\S/ contains=@Spell "autocmd FileType sh syntax region Comment start=/^#/ end=/^[^#]/ contains=@Spell "autocmd FileType sh syntax region Comment start=/^#/ end=/[\r\n]$/ contains=@Spell +"autocmd FileType text setlocal spell -- 2.47.3