]> git.nbdom.net Git - nb.git/commitdiff
etc/vim/source/spell.vim
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 16 Dec 2024 10:14:59 +0000 (11:14 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 16 Dec 2024 10:14:59 +0000 (11:14 +0100)
etc/vim/source/spell.vim

index 4f452eb1410b6b30e249df40a7b98c9d64b7da7d..5d46558ea37b6aedb78e1ba2cf215d8fe0a21e26 100644 (file)
@@ -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