vim: Use $XDG_DATA_HOME for spell files

This commit is contained in:
2020-12-24 01:59:27 +01:00
parent 03564cf46f
commit 00c6f56c69
2 changed files with 7 additions and 0 deletions

View File

@@ -50,6 +50,8 @@ map <leader>ss :set spelllang=
" Umlaute and sz in Insert and Command-line mode when spelllang is set to de
autocmd OptionSet spelllang call NewSpellLang(v:option_new, v:option_old)
function! NewSpellLang(new_lang, old_lang)
let &spellfile = $XDG_DATA_HOME . '/vim/spell/' . a:new_lang . '.utf-8.add'
let mappings = {
\ 'ae': 'ä',
\ 'Ae': 'Ä',