From 1ce6bebd277249738f7b56d4208fb04785f3a561 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 6 Mar 2023 13:54:03 -0500 Subject: [PATCH] Save swapfiles to ~/.cache --- dot_config/nvim/init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dot_config/nvim/init.vim b/dot_config/nvim/init.vim index 8bb630b..ee30be7 100644 --- a/dot_config/nvim/init.vim +++ b/dot_config/nvim/init.vim @@ -41,6 +41,9 @@ set timeoutlen=500 " By default timeoutlen is 1000 ms set formatoptions-=cro " Stop newline continution of comments "set clipboard=unnamedplus " Copy paste between vim and everything else set autochdir " Your working directory will always be the same as your working directory +set swapfile " Save swapfiles to ~/.cache instead of littering source dir +set dir=~/.cache/nvim + au! BufWritePost $MYVIMRC source % " auto source when writing to init.vim alternatively you can run :source $MYVIMRC