This commit is contained in:
Morten Olsen
2023-03-15 18:16:11 +01:00
commit 4bd2977f90
8 changed files with 112 additions and 0 deletions

18
plugins/undo-tree.lua Normal file
View File

@@ -0,0 +1,18 @@
local opt = vim.o
local run = vim.cmd
return {
"mbbill/undotree",
event = "BufRead",
config = function()
opt.backup = true -- enable backup
opt.backupdir = os.getenv("HOME") .. "/.vim/backup" -- save backups to this directory
opt.swapfile = false -- no swap file, no
-- save undo history
opt.undodir = os.getenv("HOME") .. "/.vim/undo"
end,
keys = {
{ "<leader>U", ":UndotreeToggle<cr>", desc = "Toggle undotree"}
}
}