[TxMt] Feature suggestion: undo in selection

Ed Singleton singletoned at gmail.com
Fri Feb 9 09:25:32 UTC 2007

On 08/02/07, William Uther <willu.mailingLists at cse.unsw.edu.au> wrote:
> Hi,
>    Just another feature suggestion.  Use case:
>    I've been making some changes in a source file.  I've been making
> the changes in two locations in the file in parallel, trying to keep
> them roughly in sync as I make the changes.  When I get to the end, I
> notice that there was a simpler set of changes for one of the two
> locations.
>    I'd like to be able to select a region of text and 'undo in
> selection'.  It is just like normal undo, but it skips over commands
> in the undo list that don't affect the selection and only undoes
> commands that do affect the selection.  (For bonus points, the
> 'skipped' undo commands could be left in the undo queue, so if I
> start using normal undo then they start being undone.)
>    I suspect that this isn't a particularly common request, so I
> don't really expect it to ever be implemented, but I thought it was
> better to mention the idea than not.

I've mentioned it before, but I used Eclipse for a few weeks to try it
out about a year ago.  It has a wonderful feature where it constantly
diffs your unsaved file against the saved version.  The line colours
are shown in the margin, and you can right click on any of them and
undo just the changes to that line (or just view the changes).  It
also has the side effect of showing you which lines you have changed.

Sequential undo is a problem that should have been solved a decade
ago.  When you have been changing two areas of code and need to undo
changes to just one of them, and you find yourself copying one,
undoing all the changes, then pasting it back in, you know there's
something significant wrong with the editor you are using.


More information about the textmate mailing list