Skip to content

sanfusu/neovim-undotree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Undotree

A neovim undotree plugin written in lua.

Screenshot

undotree

Requirements

  • nvim 0.7.0(nightly)

Download and Install

Using Vim's built-in package manager:

mkdir -p ~/.config/nvim/pack/github/start/
cd ~/.config/nvim/pack/github/start/
git clone https://github.com/jiaoshijie/undotree.git

Using vim-plug

Plug 'jiaoshijie/undotree'

Using packer.nvim

use { "jiaoshijie/undotree" }

Usage

  1. Use UndotreeToggle to toggle the undo-tree panel. You may want to map this command to whatever hotkey by adding the following line to your vimrc, take <leader>u for example.
" vimscript
nnoremap <leader>u :UndotreeToggle<cr>

-- lua
vim.api.nvim_set_keymap('n', '<leader>u', ':UndotreeToggle', {noremap = true})
  1. Some Mappings
Mappings Action
j jump to next undo node
k jump to prev undo node
Q quit undotree
q close undotree diff window
J jump to next undo node and undo to this state
K jump to prev undo node and undo to this state
p show the undotree diff window if it has been shown then jump into it
<cr> undo to this state

License

MIT

Reference

About

neovim undotree written in lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 96.9%
  • Vim Script 3.1%