Ben Fritz wrote:
> I only recently started using undo branches, thanks to my discovery of
> the histwin plugin:
>
> http://www.vim.org/scripts/script.php?script_id=2932
>
> With :earlier 1file being available, which would probably involve
> appropriate (parseable) markers, I imagine this plugin could readily
> be expanded to show these file tags, giving you even more information
> to help determine what state the times on the branches actually
> correspond to.
I find the undo branches very nice but also hard to use in practice.
I tend to get lost where I am in the tree when using :undo or :earlier
commands. Currently, the ":undolist" command only shows something
like this:
:undolist
number changes time
1 15 08:53:07
5 18 08:53:20
7 14 08:53:29
Would it be possible to draw the structure of the undo tree?
What about the following mock up (use a fixed size font to properly
view the ASCII art):
:undolist
number changes time
1 15 08:53:07 <--3--o-------------12-->
5 18 08:53:20 \--1--S-------14-->
7 14 08:53:29 \--8--*--2-->
Where:
< ... is a root node in the tree. There is generally only 1 root node
as in above example. However, because of limited undo levels,
there can also be more than root node.
o ... is a node in the undo tree from which multiple sub-branches start.
\ ... is the start of a sub-branch.
> ... is a leaf node in the undo tree.
S ... is the tag of node where file was last (S)aved.
* ... is the current position in the undo tree. It is often located on
a leaf. However, when using :undo or :earlier commands, it may not
be located on a leaf. In above example, user has undone 2 changes
from the leaf in last branch so * is not located on a leaf.
The numbers represent the number of intermediate changes between
nodes o \ > S * in undo tree.
I realize that drawing the undo tree may be tricky when the undo tree
becomes large: it may then not fit on the width of the screen. In that
case, it could be truncated.
It would make the undo tree structure more intuitive.
What do you think?
-- Dominique
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php