aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-04-23 00:43:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-04-23 00:43:45 +1200
commita4960b6efa94c947bd2d5ec08c02bd50ba46eecd (patch)
treec9bcc5cdd8cc379821a6f5aa38dfbbb1fe0d0a74
parentAdd manual page for phpcsff(1df) (diff)
downloaddotfiles-a4960b6efa94c947bd2d5ec08c02bd50ba46eecd.tar.gz
dotfiles-a4960b6efa94c947bd2d5ec08c02bd50ba46eecd.zip
Add setting for 'viewdir' option
-rw-r--r--Makefile3
-rw-r--r--vim/vimrc11
2 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8146f1cc..5ace42c1 100644
--- a/Makefile
+++ b/Makefile
@@ -595,7 +595,8 @@ install-vim-cache:
$(VIMDIR)/cache/backup \
$(VIMDIR)/cache/spell \
$(VIMDIR)/cache/swap \
- $(VIMDIR)/cache/undo
+ $(VIMDIR)/cache/undo \
+ $(VIMDIR)/cache/view
install-vim-compiler:
mkdir -p -- $(VIMDIR)/compiler
diff --git a/vim/vimrc b/vim/vimrc
index d0525c30..adbc9f05 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -242,6 +242,17 @@ if has#('persistent_undo')
call path#Create($MYVIM.'/undo')
endif
+" Set up a directory for files generated by :mkview. To date, I think I have
+" used this twice in my life, but may as well be consistent with the other
+" directories of this type. This isn't a comma-separated list like the others
+" ('backupdir', 'directory', 'spell', 'undodir')
+"
+if has#('mksession')
+ execute 'set viewdir='
+ \.option#Escape(option#item#Escape($MYVIM.'/view'))
+ call path#Create($MYVIM.'/view')
+endif
+
" Now that we have a bit more confidence in our runtime environment, set up
" all of the filetype detection, plugin, and indent hooks.
"