Save swapfiles to ~/.cache

This commit is contained in:
Andrew Scott 2023-03-06 13:54:03 -05:00
parent ea36bd8155
commit 1ce6bebd27
Signed by: a
GPG key ID: 7CD5A5977E4931C1

View file

@ -41,6 +41,9 @@ set timeoutlen=500 " By default timeoutlen is 1000 ms
set formatoptions-=cro " Stop newline continution of comments set formatoptions-=cro " Stop newline continution of comments
"set clipboard=unnamedplus " Copy paste between vim and everything else "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 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 au! BufWritePost $MYVIMRC source % " auto source when writing to init.vim alternatively you can run :source $MYVIMRC