Quantcast
Channel: welcome to the world of…
Viewing all articles
Browse latest Browse all 14

VIM auto save spell checking language

$
0
0

If switching between languages is frequent then having a fixed default spell checking language on every start is not very comfortable. This simple plugin solved my issue:

let g:autosave_spelllang_file=expand("~/.vim/save/last_spelllang.vim")
 
function! g:save_spelllang()
  call writefile(["set spelllang=".&spelllang], g:autosave_spelllang_file)
endfunction
 
augroup autosave_spelllang
  au!
  au VimLeavePre * call g:save_spelllang()
augroup END
 
source ~/.vim/save/last_spelllang.vim

Viewing all articles
Browse latest Browse all 14

Trending Articles