[OT] vi vs. vim

Geoff Gerrietts geoff at gerrietts.net
Thu Jan 30 05:56:24 CET 2003

Quoting grayrest (grayrest at grayrest.com):
> Andrew Bennetts wrote:
> >Someone told me something similar once.  I think it was that "uu" or "u." 
> >or
> >something like that in vi would undo, then redo, which is a convenient way
> >go back to the point in the source where you made the last change, without
> >changing it.  In vim (without tweaking the compatibility options), you'd
> >have to do "u" then ^R.
> >
> That would make sense, but if you care that much use '' or `` to get 
> back to the spot or line you last edited in vim and keep multiple undo.

If you /do/ tweak your cpoptions so that "u" behaves as in vi, "uu"
will work as the dinosaurs expect, but "u<ctrl-r>" will provide
multi-level undo. You can hit <ctrl-r> as many times as you like and
keep going back, then hit "u" again to switch direction. For someone
with vi-trained keying habits, it's handy.


Geoff Gerrietts <geoff @ gerrietts.net> "Many a man's reputation would not 
                                         know his character if they met on 
http://www.gerrietts.net/                the street." --Elbert Hubbard

More information about the Python-list mailing list