Added spelling function and se add file
This commit is contained in:
parent
ca517707ff
commit
567a253d53
0
.vim/spell/sv.utf-8.add
Normal file
0
.vim/spell/sv.utf-8.add
Normal file
17
.vimrc
17
.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 <Left> :echo "No left for you!"<CR>
|
||||
vnoremap <Left> :<C-u>echo "No left for you!"<CR>
|
||||
@ -40,6 +52,10 @@ let mapleader=" "
|
||||
map <Leader>ss :call FixLastSpellingError()<CR>
|
||||
map <Leader>u1 :call MakeHeading(1)<CR>
|
||||
map <Leader>u2 :call MakeHeading(2)<CR>
|
||||
map <Leader>ls :call Spelling("sv")<CR>
|
||||
map <Leader>le :call Spelling("en")<CR>
|
||||
map <Leader>lo :call Spelling("off")<CR>
|
||||
|
||||
|
||||
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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user