All Projects → jdkato → Sublundo

jdkato / Sublundo

Licence: GPL-3.0 License
A Sublime Text 3 package implementing Vim-like branching undo/redo.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sublundo

js-undo-manager
Simple JavaScript undo/redo command manager supporting transactions with no dependencies
Stars: ✭ 23 (+43.75%)
Mutual labels:  undo-redo
night-owl-sublime-scheme
A Sublime Text color scheme based on Sarah Drasner's Night Owl VSCode theme
Stars: ✭ 52 (+225%)
Mutual labels:  sublime-text-3
GithubEmoji
Github emoji in markdown documents and commit messages for Sublime Text
Stars: ✭ 30 (+87.5%)
Mutual labels:  sublime-text-3
FileHistory
Sublime Text plugin that keeps track of files which have been recently closed, as well as files that have been recently accessed.
Stars: ✭ 51 (+218.75%)
Mutual labels:  sublime-text-3
SublimePapyrus
A Sublime Text 2 and 3 package for the Papyrus scripting language.
Stars: ✭ 44 (+175%)
Mutual labels:  sublime-text-3
AFileIcon
Sublime Text File-Specific Icons for Improved Visual Grepping
Stars: ✭ 192 (+1100%)
Mutual labels:  sublime-text-3
AvalonHelper
avalon completion for sublime 3
Stars: ✭ 40 (+150%)
Mutual labels:  sublime-text-3
old-fashioned-donut
a programming language for time leapers
Stars: ✭ 17 (+6.25%)
Mutual labels:  undo-redo
undo-canvas
Add undo/redo functions to CanvasRenderingContext2D
Stars: ✭ 33 (+106.25%)
Mutual labels:  undo-redo
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (+412.5%)
Mutual labels:  sublime-text-3
sublime-node-snippets
A collection of completions/snippets for node.js v8.x
Stars: ✭ 14 (-12.5%)
Mutual labels:  sublime-text-3
dotfiles
My personal dotfiles repository
Stars: ✭ 36 (+125%)
Mutual labels:  sublime-text-3
github markdown snippets
GitHub flavored Markdown with plain'ol HTML knowledge! Boom!
Stars: ✭ 23 (+43.75%)
Mutual labels:  sublime-text-3
sublime-live-server
🌍️ Launch a Development Server directly from Sublime Text
Stars: ✭ 49 (+206.25%)
Mutual labels:  sublime-text-3
sublime-text
Subime Text 相关资源收集整理
Stars: ✭ 62 (+287.5%)
Mutual labels:  sublime-text-3
MikrotikScript
Syntax highlighting and completions for the Mikrotik Scripting language for the Sublime Text editor
Stars: ✭ 39 (+143.75%)
Mutual labels:  sublime-text-3
alfred-sublime-text
Filter and open your Sublime Text (2 and 3) project files from Alfred.
Stars: ✭ 66 (+312.5%)
Mutual labels:  sublime-text-3
sublime-evernote
Open and Save Evernote notes from Sublime Text 3 using Markdown
Stars: ✭ 1,164 (+7175%)
Mutual labels:  sublime-text-3
UndoRedo.js
A powerful and simple JavaScript library provides a history for undo/redo functionality. Just like a time machine! 🕐
Stars: ✭ 19 (+18.75%)
Mutual labels:  undo-redo
Milotic
Color Full Theme for All Text Editors!
Stars: ✭ 23 (+43.75%)
Mutual labels:  sublime-text-3

Sublundo Build Status Build status PEP8 Sublime Text version codebeat badge Package Control

sublundo

Sublundo brings Vim-like persistent, branching undo/redo to Sublime Text 3. It was inspired by Gundo (and its successor, Mundo).

However, since Sublime Text doesn't have native support for branching undo like Vim, we had to build our own data structure—the UndoTree. An UndoTree is an N-ary tree containing nodes that represent a particular buffer state:

tree

Each node contains, among other attributes, a map associating node IDs to patches. This means that, instead of having to store the entire buffer for each insertion (which often consists of small changes), we only need to store the information necessary to travel back and forth (in both the parent → children and child → parent directions). For example: if A = 'Hello, world!' and B = 'Bye, world!', the A → B translation would be [(-1, 'H'), (1, 'By'), (0, 'e'), (-1, 'llo'), (0, ', wo')]. In Python terms, we'd have:

>>> t = UndoTree()
>>> t.insert('Hello, world!')
>>> t.insert('Bye, world!')
>>> t.text()
'Bye, world!'
>>> t.undo()
# (buffer, patch, cursor position)
('Hello, world!', '@@ -1,7 +1,9 @@\n+H\n-By\n e\n+llo\n , wo\n', None)
>>> t.text()
'Hello, world!'

Installation

  1. Install Package Control.
  2. Bring up the Command Palette (Command-Shift-P on macOS and Ctrl-Shift-P on Linux/Windows).
  3. Select Package Control: Install Package and then select Sublundo when the list appears.

Usage

This package completely overrides the built-in undo and redo commands: whenever you undo or redo an edit, the sublundo command is run instead. So, you should be able to edit, undo, and redo text as you normally would.

When you want to either visualize or navigate the UndoTree, you invoke the Sublundo: Visualize command and then use the following keys to move around:

  • up (or k): Move up the current branch (i.e., invoke redo).
  • down (or j): Move down the current branch (i.e., invoke undo).
  • left (or h): Move to the next branch on the left.
  • right (or l): Move to the next branch on the right.

For information on the available settings, see the default settings file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].