vim:keys: Cycle spelllangs only between en & de
If :h 'spelllang' is something else, do nothing. A possible future improvement could be to keep a list of the languages to cycle between and first adding any other languages to this list so that one could return to the original setting. I see this especially useful when the current setting is `en,de`.
This commit is contained in:
@@ -60,7 +60,7 @@ noremap <leader>[S [S1z=<C-O>
|
||||
function! CycleSpellLang()
|
||||
if (&spelllang == 'en')
|
||||
setl spelllang=de
|
||||
else
|
||||
elseif (&spelllang == 'de')
|
||||
setl spelllang=en
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user