aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-05-09 18:26:09 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-05-09 21:37:41 +1200
commit159b6d2445240b4b459305dfbfea45e7e66d6a2c (patch)
tree6b2550b71764aa9d956c8986de9cadf75a1e5c9e
parentMove persistent undo files into $XDG_STATE_HOME (diff)
downloaddotfiles-159b6d2445240b4b459305dfbfea45e7e66d6a2c.tar.gz
dotfiles-159b6d2445240b4b459305dfbfea45e7e66d6a2c.zip
Move saved views into $XDG_STATE_HOME
-rw-r--r--vim/vimrc8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 73ccd314..a078c6c8 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -340,12 +340,12 @@ endif
" directories of this type. This isn't a comma-separated list like the others
" ('backupdir', 'directory', 'spell', 'undodir')
"
-if exists('s:xdgcachehome') && s:xdgcachehome !=# '' && has('mksession')
- if !isdirectory(s:xdgcachehome.'/view')
- call mkdir(s:xdgcachehome.'/view', 'p', 0700)
+if exists('s:xdgstatehome') && s:xdgstatehome !=# '' && has('mksession')
+ if !isdirectory(s:xdgstatehome.'/view')
+ call mkdir(s:xdgstatehome.'/view', 'p', 0700)
endif
execute 'set viewdir='.option#Escape(option#item#Escape(
- \ s:xdgcachehome.'/view'
+ \ s:xdgstatehome.'/view'
\))
endif