summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <adam.moloney.stuck@gmail.com>2021-12-04 22:37:36 +0100
committeradamstuck <adam.moloney.stuck@gmail.com>2021-12-04 23:23:18 +0100
commitf45540aefcb9be0736a3bde718ea861d585615ee (patch)
tree509e99c9b407e457ecfb0a0d2cf8993691f76226
parent29e961ebecc388a6c61b622fb001240da6172888 (diff)
Vim/nvim undo history in .cache
-rw-r--r--.config/nvim/lua/setup.lua2
-rw-r--r--.vim/vimrc1
2 files changed, 2 insertions, 1 deletions
diff --git a/.config/nvim/lua/setup.lua b/.config/nvim/lua/setup.lua
index 92677fb..0a02795 100644
--- a/.config/nvim/lua/setup.lua
+++ b/.config/nvim/lua/setup.lua
@@ -1,7 +1,7 @@
local set = vim.opt
vim.cmd('syntax enable')
-vim.cmd('set undodir=$HOME/.vim/undo')
+vim.cmd('set undodir=$XDG_CACHE_HOME/nvim/undo')
vim.cmd('set undofile')
vim.cmd('colorscheme doom-one')
diff --git a/.vim/vimrc b/.vim/vimrc
index f4215e2..d527702 100644
--- a/.vim/vimrc
+++ b/.vim/vimrc
@@ -77,5 +77,6 @@ set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p')
set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p')
+set undofile
if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif