mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 21:45:10 +01:00
vim spellchecking: toggle/loop with F7 through none/nl/en_gb/en_us
This commit is contained in:
BIN
.vim/spell/nl.utf-8.spl
Normal file
BIN
.vim/spell/nl.utf-8.spl
Normal file
Binary file not shown.
BIN
.vim/spell/nl.utf-8.sug
Normal file
BIN
.vim/spell/nl.utf-8.sug
Normal file
Binary file not shown.
26
.vimrc
26
.vimrc
@@ -48,6 +48,32 @@ let g:ctrlp_switch_buffer = 0
|
|||||||
|
|
||||||
" == Content convenience ======
|
" == Content convenience ======
|
||||||
|
|
||||||
|
" Spell Check (http://vim.wikia.com/wiki/Toggle_spellcheck_with_function_keys)
|
||||||
|
let b:myLang=0
|
||||||
|
let g:myLangList=["nospell","nl","en_gb","en_us"]
|
||||||
|
function! ToggleSpell()
|
||||||
|
let b:myLang=b:myLang+1
|
||||||
|
if b:myLang>=len(g:myLangList) | let b:myLang=0 | endif
|
||||||
|
if b:myLang==0
|
||||||
|
setlocal nospell
|
||||||
|
else
|
||||||
|
execute "setlocal spell spelllang=".get(g:myLangList, b:myLang)
|
||||||
|
endif
|
||||||
|
echo "spell checking language:" g:myLangList[b:myLang]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
nmap <silent> <F7> :call ToggleSpell()<CR>
|
||||||
|
|
||||||
|
" In case the spelling language was set by other means than ToggleSpell() (a filetype autocommand say):
|
||||||
|
if !exists( "b:myLang" )
|
||||||
|
if &spell
|
||||||
|
let b:myLang=index(g:myLangList, &spelllang)
|
||||||
|
else
|
||||||
|
let b:myLang=0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
" Python autocompletion
|
" Python autocompletion
|
||||||
Plugin 'davidhalter/jedi-vim'
|
Plugin 'davidhalter/jedi-vim'
|
||||||
" Code checker. For python, install flake8 or pylint, preferably in the
|
" Code checker. For python, install flake8 or pylint, preferably in the
|
||||||
|
|||||||
Reference in New Issue
Block a user