neovim: Exclude temp files from persistent undo

Otherwise it is possible to restore cleartext passwords from pass or
sops from the undo files.
nazuna
Simon Bruder 2022-06-12 21:03:32 +02:00
parent 67b30a52af
commit 2ce6f535d0
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,8 @@ cmd('colorscheme solarized')
opt.undofile = true
opt.undolevels = 4096
opt.undoreload = 16384
cmd('autocmd BufWritePre /dev/shm/* setlocal noundofile') -- exclude pass
cmd('autocmd BufWritePre /tmp/* setlocal noundofile') -- exclude sops
-- Behaviour
opt.hidden = true -- background buffers