diff options
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 02 May 2020 14:04:10 UTC +" Last updated: Sat, 02 May 2020 14:34:52 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -111,13 +111,15 @@ let s:xdgconfigpaths = xdg#['config']['dirs'] if xdg#['config']['home'] !=# v:null call insert(s:xdgconfigpaths, xdg#['config']['home']) endif -for s:xdgconfigpath in reverse(s:xdgconfigpaths) - execute 'set runtimepath^=' - \.option#Escape(option#item#Escape(s:xdgconfigpath)) - execute 'set runtimepath+=' - \.option#Escape(option#item#Escape(s:xdgconfigpath.'/after')) -endfor -unlet! s:xdgconfigpath +if !empty(s:xdgconfigpaths) + for s:xdgconfigpath in reverse(s:xdgconfigpaths) + execute 'set runtimepath^=' + \.option#Escape(option#item#Escape(s:xdgconfigpath)) + execute 'set runtimepath+=' + \.option#Escape(option#item#Escape(s:xdgconfigpath.'/after')) + endfor + unlet s:xdgconfigpath +endif unlet s:xdgconfigpaths " Now put the XDG cache home at the very front, so that e.g. 'spellfile' gets @@ -413,13 +415,15 @@ try if xdg#['data']['home'] !=# v:null call insert(s:refdirs, xdg#['data']['home']) endif - for s:refdir in reverse(s:refdirs) - execute 'set dictionary^=' - \.option#Escape(option#item#Escape(s:refdir.'/dictionary.txt')) - execute 'set thesaurus^=' - \.option#Escape(option#item#Escape(s:refdir.'/thesaurus.txt')) - endfor - unlet! s:refdir + if !empty(s:refdirs) + for s:refdir in reverse(s:refdirs) + execute 'set dictionary^=' + \.option#Escape(option#item#Escape(s:refdir.'/dictionary.txt')) + execute 'set thesaurus^=' + \.option#Escape(option#item#Escape(s:refdir.'/thesaurus.txt')) + endfor + unlet s:refdir + endif unlet s:refdirs catch /^Vim\%((\a\+)\)\=:E474:/ endtry |