aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-03 02:01:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-03 02:01:45 +1200
commitf8db34968d3cdcc0b171d2a45cf6060ce7b7e752 (patch)
treee4defe1f390f7fa0f3044af0da0394c3ea7c1309
parentSeparate cache runtime behaviour from config (diff)
downloaddotfiles-f8db34968d3cdcc0b171d2a45cf6060ce7b7e752.tar.gz
dotfiles-f8db34968d3cdcc0b171d2a45cf6060ce7b7e752.zip
Add handling of "after" subdirs in Vim XDG config
-rw-r--r--vim/vimrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 04aebfd6..0e50fbea 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -2,7 +2,7 @@
" Tom Ryder (tejr)’s Literate Vimrc
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"
-" Last updated: Sat, 02 May 2020 13:59:44 UTC
+" Last updated: Sat, 02 May 2020 14:01:35 UTC
"
" │ And I was lifted up in heart, and thought
" │ Of all my late-shown prowess in the lists,
@@ -103,7 +103,9 @@ endif
" We'll use the XDG directories as machine-local configuration and storage.
" <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables>
"
-" Add all the configuration directories to 'runtimepath'.
+" Add all the configuration directories to 'runtimepath', including "after"
+" directories to the end of it, in reverse order, forming the desired layers
+" of configuration.
"
let s:xdgconfigpaths = xdg#['config']['dirs']
if xdg#['config']['home'] !=# ''
@@ -112,6 +114,8 @@ 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
unlet s:xdgconfigpaths