diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-25 09:39:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-25 09:39:48 +1200 |
commit | 502f98bc6a58503ecafa2d594b6f09e59ee91448 (patch) | |
tree | cb0f87d5fd5de2716856e8363ab38e49274aef4c | |
parent | Merge branch 'hotfix/v9.9.4' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-502f98bc6a58503ecafa2d594b6f09e59ee91448.tar.gz dotfiles-502f98bc6a58503ecafa2d594b6f09e59ee91448.zip |
Merge branch 'release/v9.10.0'v9.10.0
* release/v9.10.0:
Cache XDG values in vimrc
Rewrite and rewrap a comment block in vimrc
Correct two command references in vimrc comment
Correct a muttrc comment
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | mutt/muttrc | 4 | ||||
-rw-r--r-- | vim/vimrc | 83 |
3 files changed, 48 insertions, 43 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v9.9.4 -Thu, 21 May 2020 03:34:15 +0000 +tejr dotfiles v9.10.0 +Sun, 24 May 2020 21:39:45 +0000 diff --git a/mutt/muttrc b/mutt/muttrc index d1485718..62285b2f 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -22,8 +22,8 @@ set abort_noattach_regexp = "attached is|(find|i've|see) attached" unset abort_unmodified # Put the alias file in a nice XDG location, distinct from the muttrc, so that -# we don't end up losing them each time the dotfiles are reinstalled; muttrd(5) -# points out that this file needs to be explicitly sourced, too. +# we don't end up losing them each time the dotfiles are reinstalled; `man +# 5 muttrc` points out that this file needs to be explicitly sourced, too. # set alias_file \ = ~/.config/mutt/aliases @@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 16 May 2020 04:57:25 UTC +" Last updated: Sun, 24 May 2020 10:00:15 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -128,14 +128,19 @@ let $MYVIM = option#Split(&runtimepath)[0] " $MYVIM, per the above. We're just leaning on XDG’s conventions to provide " separate locations for cache files and other configuration. " - " We'll start by retrieving the list of valid paths for configuration from " both the XDG_CONFIG_HOME and XDG_CONFIG_DIRS variables, or from their " defaults, using autoloaded xdg# functions. " -" We put XDG_CONFIG_HOME at the front of the list with insert(), provided it -" isn't empty, which is what the function returns when the configured path -" isn't absolute. This is per the standard's dictum: +let s:xdgcachehome = xdg#CacheHome() +let s:xdgconfigdirs = xdg#ConfigDirs() +let s:xdgconfighome = xdg#ConfigHome() +let s:xdgdatadirs = xdg#DataDirs() +let s:xdgdatahome = xdg#DataHome() + +" We put XDG_CONFIG_HOME at the front of the 'runtimepath' list with insert(), +" provided it isn't empty, which is what the function returns when the +" configured path isn't absolute. This is per the standard's dictum: " " │ All paths set in these environment variables must be absolute. If an " │ implementation encounters a relative path in any of these variables it @@ -146,18 +151,18 @@ let $MYVIM = option#Split(&runtimepath)[0] " " Ours not to reason why… " -if xdg#ConfigHome() !=# '' || !empty(xdg#ConfigDirs()) +if s:xdgconfighome !=# '' || !empty(s:xdgconfigdirs) execute 'set runtimepath^='.option#Escape(join(map( \ extend( - \ xdg#ConfigHome() !=# '' ? [xdg#ConfigHome()] : [], - \ xdg#ConfigDirs() + \ s:xdgconfighome !=# '' ? [s:xdgconfighome] : [], + \ s:xdgconfigdirs \), \ 'option#item#Escape(v:val)' \), ',')) execute 'set runtimepath+='.option#Escape(join(map( \ reverse(extend( - \ xdg#ConfigHome() !=# '' ? [xdg#ConfigHome()] : [], - \ xdg#ConfigDirs() + \ s:xdgconfighome !=# '' ? [s:xdgconfighome] : [], + \ s:xdgconfigdirs \)), \ 'option#item#Escape(v:val.''/after'')' \), ',')) @@ -173,12 +178,12 @@ endif " v8.1.716 introduced a way to set this with an option named 'viminfofile', " but I don't see a reason to use that. " -if xdg#CacheHome() !=# '' - if !isdirectory(xdg#CacheHome()) - call mkdir(xdg#CacheHome(), 'p', 0700) +if s:xdgcachehome !=# '' + if !isdirectory(s:xdgcachehome) + call mkdir(s:xdgcachehome, 'p', 0700) endif execute 'set viminfo+='.option#Escape( - \ 'n'.xdg#CacheHome().'/viminfo' + \ 'n'.s:xdgcachehome.'/viminfo' \) endif @@ -225,12 +230,12 @@ set history=10000 " 'backupfullname', 'swapfilefullname' would have been clearer. " set backup -if xdg#CacheHome() !=# '' - if !isdirectory(xdg#CacheHome().'/backup') - call mkdir(xdg#CacheHome().'/backup', 'p', 0700) +if s:xdgcachehome !=# '' + if !isdirectory(s:xdgcachehome.'/backup') + call mkdir(s:xdgcachehome.'/backup', 'p', 0700) endif execute 'set backupdir^='.option#Escape(option#item#Escape( - \ xdg#CacheHome().'/backup'.(has#('patch-8.1.251') ? '//' : '') + \ s:xdgcachehome.'/backup'.(has#('patch-8.1.251') ? '//' : '') \)) endif @@ -267,12 +272,12 @@ endif " its name, in order to avoid filename collisions, since the 'directory' " option has supported that hint for much longer than 'backupdir' has. " -if xdg#CacheHome() !=# '' - if !isdirectory(xdg#CacheHome().'/swap') - call mkdir(xdg#CacheHome().'/swap', 'p', 0700) +if s:xdgcachehome !=# '' + if !isdirectory(s:xdgcachehome.'/swap') + call mkdir(s:xdgcachehome.'/swap', 'p', 0700) endif execute 'set directory^='.option#Escape(option#item#Escape( - \ xdg#CacheHome().'/swap//' + \ s:xdgcachehome.'/swap//' \)) endif @@ -288,13 +293,13 @@ endif " Support for these persistent undo file caches was not released until v7.3.0, " so we need to check for the feature’s presence before we enable it. " -if xdg#CacheHome() !=# '' && has#('persistent_undo') +if s:xdgcachehome !=# '' && has#('persistent_undo') set undofile - if !isdirectory(xdg#CacheHome().'/undo') - call mkdir(xdg#CacheHome().'/undo', 'p', 0700) + if !isdirectory(s:xdgcachehome.'/undo') + call mkdir(s:xdgcachehome.'/undo', 'p', 0700) endif execute 'set undodir^='.option#Escape(option#item#Escape( - \ xdg#CacheHome().'/undo//' + \ s:xdgcachehome.'/undo//' \)) endif @@ -303,12 +308,12 @@ endif " directories of this type. This isn't a comma-separated list like the others " ('backupdir', 'directory', 'spell', 'undodir') " -if xdg#CacheHome() !=# '' && has#('mksession') - if !isdirectory(xdg#CacheHome().'/view') - call mkdir(xdg#CacheHome().'/view', 'p', 0700) +if s:xdgcachehome !=# '' && has#('mksession') + if !isdirectory(s:xdgcachehome.'/view') + call mkdir(s:xdgcachehome.'/view', 'p', 0700) endif execute 'set viewdir='.option#Escape(option#item#Escape( - \ xdg#CacheHome().'/view' + \ s:xdgcachehome.'/view' \)) endif @@ -429,18 +434,18 @@ set spellcapcheck=[.?!]\\%(\ \ \\\|[\\n\\r\\t]\\) " 'isfname'; the blacklist is hard-coded. " set dictionary^=/usr/share/dict/words -if xdg#DataHome() !=# '' || !empty(xdg#DataDirs()) +if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) execute 'set dictionary^='.option#Escape(join(map( \ extend( - \ xdg#DataHome() !=# '' ? [xdg#DataHome()] : [], - \ xdg#DataDirs() + \ s:xdgdatahome !=# '' ? [s:xdgdatahome] : [], + \ s:xdgdatadirs \), \ 'option#item#Escape(v:val.''/dictionary.txt'')' \), ',')) execute 'set thesaurus^='.option#Escape(join(map( \ extend( - \ xdg#DataHome() !=# '' ? [xdg#DataHome()] : [], - \ xdg#DataDirs() + \ s:xdgdatahome !=# '' ? [s:xdgdatahome] : [], + \ s:xdgdatadirs \), \ 'option#item#Escape(v:val.''/thesaurus.txt'')' \), ',')) @@ -1123,10 +1128,10 @@ nnoremap <C-L> inoremap <C-L> \ <C-O>:execute "normal \<C-L>"<CR> -" We use :vnoremap here rather than :xnoremap and thereby make the mapping -" apply to select mode as well, because CTRL-L doesn’t reflect a printable -" character, and so we may as well make it work, even though I don’t actually -" use select mode directly. +" We use :vmap here rather than :xmap to have the mapping applied for select +" mode as well as visual mode. This is because CTRL-L doesn’t reflect +" a printable character, and so we don't shadow anything by making it work, +" even though I don’t actually use select mode directly very much. " vmap <C-L> \ <Esc><C-L>gv |