Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday February 08, 2005
11:53 AM

How do I keep the undo stack in VIM?

[ #23083 ]

I'm using Vim 6.2.457. Every time I try to edit a new file using "e $filename" or switch buffers with ":bn" or ":bp", I lose the undo stack. Does anyone know how to preserve that?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If you really need it, and you don't find an answer here, post your question to the Vim mailing list [].

    I'm pretty sure they'll be able to help :-) It's one of the best mailing lists out there :-)

    • Thanks! I just subscribed. I should have done that earlier but I'm awfully used to everyone here just knowing their stuff :)

      (bad Ovid. No Corinna (private joke))

  • Please post about it. I'd love to know a solution or workaround for this.

  • The 'hidden' option is a secret key to effective Vimming.

    With 'nohidden' set, Vim discards the buffer when you leave it. It loses all its session data, like the undo stack. It's also slower if you switch a lot, because it rereads the file to open the buffer when you switch back to a discarded buffer.

    If you set 'hidden' Vim will keep the buffer around when you leave it. You won't lose anything, except a little memory for the buffer to live in.

    Sometimes I use a box on which I haven't installed my vimrc []