Zeyu-Li / undo-tree-vscode

Undo Tree but for VS Code

Home Page:https://marketplace.visualstudio.com/items?itemName=UndoTree.undo-tree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undo Tree

GitHub Repo stars GitHub Sponsors

Like the Undo Tree addon found in Vim or Emacs but found right inside of VSCode! Quickly navigate the states of the code easier using 1 shortcut. Functions sort of like git!

Make changes and create a state with ctrl+y or +y on MacOS. This will create a new child state to the initial state.

To go back a state to the parent state do ctrl+alt+z. Now to go back the new state, hit ctrl+alt+y. Make some more changes and hitting +alt+z will create a new state and undo.

Navigate easier using the sidebar and click to get to the desired state. You can even see the timecode of the changes if you toggle show timecode.

Demo

demo.gif

Features

All states can be accessed visually on the Undo Tree sidebar when you click on the history icon in the activity bar.

To create a save point do ctrl+y or +y on MacOS. This will save your current changes in a state as a child to your previous save point.

To go back in history (or undo) hit ctrl+alt+y. To redo, hit ctrl+alt+y. This will go to your first save point if you have multiple under the parent node.

Toggle the timecode of when you made the changes by going to command palette and looking up Undo Tree: Toggle Showing Timecode.

Reset the tree by going to command palette and looking up Undo Tree: Reset. This will remove all the saved states.

Tip: If you have a super large file, this extension may not be good for you since it stores the code of every node in memory.

Issues

If there are any issues, we track it on GitHub issues' tab.

Thanks in advance for reporting any issues


Contributing

See the GitHub issues' tab.

Thanks in advance if you want to contribute

Packaging

To package, first build with

vsce package --baseImagesUrl https://raw.githubusercontent.com/llvm/llvm-project/master/clang-tools-extra/clangd/clients/clangd-vscode/

Then do vsce publish if you are the owner

Thanks

About

Undo Tree but for VS Code

https://marketplace.visualstudio.com/items?itemName=UndoTree.undo-tree

License:MIT License


Languages

Language:TypeScript 99.1%Language:JavaScript 0.9%