add persistent undo functionality to both neovim and vim

This commit is contained in:
2025-10-09 18:42:16 +02:00
parent 71ba1dce14
commit 1d8df9d310
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -70,6 +70,12 @@ vim.cmd [[
set errorformat^=[----]\ %f:%l:\ %m
]]
vim.o.undofile = true
vim.o.undodir = vim.fn.expand("~/.vim/neoundodir")
if vim.fn.isdirectory(vim.o.undodir) == 0 then
vim.fn.mkdir(vim.o.undodir, "p")
end
vim.keymap.set('n', ',cf', function()
local qf = vim.fn.getqflist()
for i, item in ipairs(qf) do