aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION4
-rw-r--r--vim/vimrc53
2 files changed, 30 insertions, 27 deletions
diff --git a/VERSION b/VERSION
index c7443ec1..74e15306 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v8.24.0
-Sat, 02 May 2020 14:16:31 +0000
+tejr dotfiles v8.25.0
+Sat, 02 May 2020 15:25:10 +0000
diff --git a/vim/vimrc b/vim/vimrc
index a5814aa7..a08a4287 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -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 15:15:57 UTC
"
" │ And I was lifted up in heart, and thought
" │ Of all my late-shown prowess in the lists,
@@ -111,21 +111,23 @@ 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)
+ 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
" Now put the XDG cache home at the very front, so that e.g. 'spellfile' gets
" 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
@@ -408,21 +410,22 @@ set spellcapcheck=[.?!]\\%(\ \ \\\|[\\n\\r\\t]\\)
" 'isfname'; the blacklist is hard-coded.
"
set dictionary^=/usr/share/dict/words
-try
- let s:refdirs = xdg#['data']['dirs']
- 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
- unlet s:refdirs
-catch /^Vim\%((\a\+)\)\=:E474:/
-endtry
+let s:refdirs = xdg#['data']['dirs']
+if xdg#['data']['home'] !=# v:null
+ call insert(s:refdirs, xdg#['data']['home'])
+endif
+if !empty(s:refdirs)
+ try
+ 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")'
+ \), ','))
+ catch /^Vim\%((\a\+)\)\=:E474:/
+ endtry
+endif
+unlet s:refdirs
" Next, we’ll modernize a little in adjusting some options with old
" language-specific defaults.