diff options
-rw-r--r-- | vim/vimrc | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 02 May 2020 14:34:52 UTC +" Last updated: Sat, 02 May 2020 15:03:05 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -112,13 +112,12 @@ if xdg#['config']['home'] !=# v:null call insert(s:xdgconfigpaths, xdg#['config']['home']) endif 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 + execute 'set runtimepath^='.option#Escape(join(map( + \ s:xdgconfigpaths, 'option#item#Escape(v:val)' + \), ',')) + execute 'set runtimepath+='.option#Escape(join(map( + \ reverse(s:xdgconfigpaths), 'option#item#Escape(v:val."/after")' + \), ',')) endif unlet s:xdgconfigpaths @@ -126,8 +125,9 @@ unlet s:xdgconfigpaths " created in there rather than in the configuration directories. " if xdg#['cache']['home'] !=# v:null - execute 'set runtimepath^=' - \.option#Escape(option#item#Escape(xdg#['cache']['home'])) + execute 'set runtimepath^='.option#Escape( + \ option#item#Escape(xdg#['cache']['home']) + \) endif " We need a command to reliably establish a full path, whether or not the @@ -416,13 +416,12 @@ try call insert(s:refdirs, xdg#['data']['home']) endif 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 + execute 'set dictionary^='.option#Escape(join(map( + \ s:refdirs, 'option#item#Escape(v:val."/dictionary.txt")' + \), ',')) + execute 'set thesaurus^='.option#Escape(join(map( + \ s:refdirs, 'option#item#Escape(v:val."/thesaurus.txt")' + \), ',')) endif unlet s:refdirs catch /^Vim\%((\a\+)\)\=:E474:/ |