" ----------
else
- if (&term =~ "linux") || ($BACKGROUND == 'DARK') || ($BACKGROUND == 'dark')
+ if (&term =~ "linux") || (&term =~ "cygwin") || (&term =~ "putty")
+ \ || ($BACKGROUND == 'DARK') || ($BACKGROUND == 'dark')
\ || has("win32")
" Background of the terminal is black or dark grey
set background=dark
endif
endfunction
autocmd BufReadPost * call SetupSpell()
+
+ function! SaveSpell()
+ if expand('%') == expand('~/.vim/spell/en.ascii.add')
+ mkspell! -ascii %
+ else
+ mkspell! %
+ endif
+ endfunction
+ autocmd BufWritePost ~/.vim/spell/*.add call SaveSpell()
endif