diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-09 21:47:10 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-09 21:47:10 +1200 |
commit | 1a5e1bdc0efd3c8c3e3f4bf2ec3f440a1624739f (patch) | |
tree | d2a6d2f026e401d14a8e2e12e124922dbc79ca58 /vim/vimrc | |
parent | Move saved views into $XDG_STATE_HOME (diff) | |
download | dotfiles-1a5e1bdc0efd3c8c3e3f4bf2ec3f440a1624739f.tar.gz dotfiles-1a5e1bdc0efd3c8c3e3f4bf2ec3f440a1624739f.zip |
Move everything else in XDG cache into state
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -138,8 +138,6 @@ let $MYVIM = option#Split(&runtimepath)[0] " defaults, using autoloaded xdg# functions. " if has('unix') - let s:xdgcachehome - \ = xdg#CacheHome() let s:xdgconfigdirs \ = xdg#ConfigDirs() let s:xdgconfighome @@ -193,12 +191,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 exists('s:xdgcachehome') && s:xdgcachehome !=# '' - if !isdirectory(s:xdgcachehome) - call mkdir(s:xdgcachehome, 'p', 0700) +if exists('s:xdgstatehome') && s:xdgstatehome !=# '' + if !isdirectory(s:xdgstatehome) + call mkdir(s:xdgstatehome, 'p', 0700) endif execute 'set viminfo+='.option#Escape( - \ 'n'.s:xdgcachehome.'/viminfo' + \ 'n'.s:xdgstatehome.'/viminfo' \) endif @@ -243,12 +241,12 @@ set history=300 " 'backupfullname', 'swapfilefullname' would have been clearer. " set backup -if exists('s:xdgcachehome') && s:xdgcachehome !=# '' - if !isdirectory(s:xdgcachehome.'/backup') - call mkdir(s:xdgcachehome.'/backup', 'p', 0700) +if exists('s:xdgstatehome') && s:xdgstatehome !=# '' + if !isdirectory(s:xdgstatehome.'/backup') + call mkdir(s:xdgstatehome.'/backup', 'p', 0700) endif execute 'set backupdir^='.option#Escape(option#item#Escape( - \ s:xdgcachehome.'/backup'.(patch#('8.1.251') ? '//' : '') + \ s:xdgstatehome.'/backup'.(patch#('8.1.251') ? '//' : '') \)) endif @@ -304,12 +302,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 exists('s:xdgcachehome') && s:xdgcachehome !=# '' - if !isdirectory(s:xdgcachehome.'/swap') - call mkdir(s:xdgcachehome.'/swap', 'p', 0700) +if exists('s:xdgstatehome') && s:xdgstatehome !=# '' + if !isdirectory(s:xdgstatehome.'/swap') + call mkdir(s:xdgstatehome.'/swap', 'p', 0700) endif execute 'set directory^='.option#Escape(option#item#Escape( - \ s:xdgcachehome.'/swap//' + \ s:xdgstatehome.'/swap//' \)) endif |