welcome to the world of…

Looks like a small bulb used to indicate something unusual, like a malfunction.

VIM auto save spell checking language

Filed under: Uncategorized — Tags: , , , , , — admin @ 2014-07-15 12:40

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

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.