neovim: add undotree

This commit is contained in:
2023-08-11 10:16:05 +03:00
parent 5aa775e18a
commit f1d7444a74
3 changed files with 13 additions and 0 deletions

View File

@@ -44,3 +44,6 @@ opt.showmode = false
opt.redrawtime = 4000
opt.list = true
opt.listchars = { multispace = "·", tab = ">~" }
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
opt.undofile = true

View File

@@ -121,3 +121,11 @@ vim.keymap.set("i", "<C-l>", next_choice, { noremap = true, silent = true })
vim.keymap.set("s", "<C-l>", next_choice, { noremap = true, silent = true })
vim.keymap.set("i", "<C-h>", prev_choice, { noremap = true, silent = true })
vim.keymap.set("s", "<C-h>", prev_choice, { noremap = true, silent = true })
-- Undotree
vim.keymap.set("n", "<leader>u", function()
vim.cmd([[
UndotreeToggle
UndotreeFocus
]])
end)

View File

@@ -122,6 +122,8 @@ require("packer").startup(function(use)
end,
})
use({ "mbbill/undotree" })
if PACKER_BOOTSTRAP then
require("packer").sync()
end