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

index 5d46558ea37b6aedb78e1ba2cf215d8fe0a21e26..d115104dcd8e23b432b82e2e86d67469920595d9 100644 (file)
@@ -1,11 +1,12 @@
-set spell
+set nospell
+autocmd FileType text,mail setlocal spell
 " Disable spell checking for code
 "echo ">>" . &filetype
-autocmd BufRead,BufNewFile * if &filetype == "" && expand('%:e') !~ 'mail' | setlocal nospell | endif
+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,perl,php,vim,python,c,cpp,java,javascript,conf 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