add 'mbbill/UndoTree'
- Gives the ability to save the undo history for entire file. - Added binding <leader>u to toggle undo tree
This commit is contained in:
parent
58d9b8263d
commit
5acf0f3f99
6
init.lua
6
init.lua
|
@ -218,6 +218,9 @@ require('lazy').setup({
|
||||||
-- Vim Surround for easier editing
|
-- Vim Surround for easier editing
|
||||||
'tpope/vim-surround',
|
'tpope/vim-surround',
|
||||||
|
|
||||||
|
-- Adds a whole history of changes made to a file.
|
||||||
|
'mbbill/undotree'
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||||
-- up-to-date with whatever is in the kickstart repo.
|
-- up-to-date with whatever is in the kickstart repo.
|
||||||
|
@ -289,6 +292,9 @@ vim.o.termguicolors = true
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap to make UndoTreeToggle more convenient
|
||||||
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
|
|
||||||
-- Remap for dealing with word wrap
|
-- Remap for dealing with word wrap
|
||||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
Loading…
Reference in New Issue