Wednesday, August 25, 2010

Use cases for new features

I had my moment already with the new persistent undo feature, where I
discovered a use case for it which transforms it from a novelty into
something I'll actually use.

I was expecting it to take longer, for floating point in 7.2 it took a
couple of months (and an unusual code file with a lookup table of trig
function results that needed pre-calculation).

Anyway, I thought I'd share.

At work, I use a version control system that does not allow for
committing selectively from a single file. That is, if I have made
multiple changes to a file, I must commit all of them, or none at all.

Yesterday I needed to commit a version of a file I was working on, but
did not want to lose some temporary debug output. So, I deleted the
debug output, saved the file, and checked it into version control.
This triggers a reload of the file (at least in my Vim setup).
Previously this would have wiped out the undo information. But not
with persistent undo enabled! I simply issued an :earlier 1f command
and had all my temporary changes intact. I could have even exited Vim
and this would still have worked. Hurray for Vim!

I know this seems a very small thing, but it's a big deal for me, as
this particular problem comes up for me every few days at least.

Any other neat use cases out there for this or other new Vim features?
I'd love to get some ideas!

--
You received this message from the "vim_use" 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

No comments: