home: nvim: avoid polluting home directory

This commit is contained in:
Renken 2022-09-07 17:37:17 +02:00
parent df2c7e71ff
commit 8142bd412b
Signed by: renken
GPG key ID: 1F2BB159B645E575

View file

@ -41,8 +41,8 @@ autocmd BufReadPost *
" Set the swap directory. The extra '/' suffix is required to make vim create
" unique filenames.
call mkdir(expand("~/.vim/swap"), "p", 0700)
set dir=~/.vim/swap//
call mkdir(expand("~/.cache/nvim/swap"), "p", 0700)
set dir=~/.cache/nvim/swap//
" Use system clipboard by default
set clipboard +=unnamedplus
@ -198,7 +198,7 @@ set nowrap
" Enable persistent undo if it is supported
if has('persistent_undo')
let vundodir = expand('~/.vim/undo')
let vundodir = expand('~/.cache/nvim/undo')
if !isdirectory(vundodir)
call mkdir(vundodir)
endif