cooler backup defaults

autoread changes from other programs, and keep persistent undo
information between sessions.
This commit is contained in:
2025-10-09 18:46:29 +02:00
parent 1d8df9d310
commit 565f7c71dc
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -70,6 +70,10 @@ vim.cmd [[
set errorformat^=[----]\ %f:%l:\ %m
]]
vim.o.backup = false
vim.o.writebackup = false
vim.o.swapfile = false
vim.o.autoread = true
vim.o.undofile = true
vim.o.undodir = vim.fn.expand("~/.vim/neoundodir")
if vim.fn.isdirectory(vim.o.undodir) == 0 then
+6
View File
@@ -33,11 +33,17 @@ nnoremap H ^
nnoremap L $
set autoindent
set cursorline
set nobackup
set nowritebackup
set noswapfile
set autoread
set undofile
set undodir=~/.vim/undodir
if !isdirectory(expand('~/.vim/undodir'))
call mkdir(expand('~/.vim/undodir'), 'p')
endif
set undodir=~/.vim/undodir
set undofile
set errorformat^=[----]\ %f:%l:\ %m