diff --git a/.vim/spell/sv.utf-8.add b/.vim/spell/sv.utf-8.add new file mode 100644 index 0000000..e69de29 diff --git a/.vimrc b/.vimrc index ac1bf01..b8734da 100644 --- a/.vimrc +++ b/.vimrc @@ -10,6 +10,18 @@ function! MakeHeading(level) endif endfunction +function! Spelling(lang) + if a:lang == "en" + setlocal spell spelllang=en_us + setlocal spellfile=~/.vim/spell/en.utf-8.add + elseif a:lang == "sv" + setlocal spell spelllang=sv + setlocal spellfile=~/.vim/spell/sv.utf-8.add + elseif a:lang == "off" + setlocal nospell + endif +endfunction + nnoremap :echo "No left for you!" vnoremap :echo "No left for you!" @@ -40,6 +52,10 @@ let mapleader=" " map ss :call FixLastSpellingError() map u1 :call MakeHeading(1) map u2 :call MakeHeading(2) +map ls :call Spelling("sv") +map le :call Spelling("en") +map lo :call Spelling("off") + filetype indent plugin on @@ -54,7 +70,6 @@ set relativenumber execute pathogen#infect() " Spellcheck -set spellfile=~/.vim/spell/en.utf-8.add " vimwiki let wiki_1 = {}