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:
2024-09-12 12:59:59 +02:00
parent f5673c2082
commit 61f1a7ee9b

View File

@@ -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