tags:

views:

1564

answers:

5

In vim, I did to much undo. How do I undo this (i.e. redo)

+15  A: 

Ctrl+r

John Millikin
Oh cool, thanks @Joachim -- didn't know about <kbd>
John Millikin
+1  A: 

In command mode use u key to undo and Ctr-r key to redo

have a look at this

http://www.vim.org/htmldoc/undo.html

Xinus
A: 

[ctrl]+r

The "r" is lower-case.

mimetnet
Actually, it shouldn't matter -- traditional consoles have no distinction between `^r` and `^R`, and Vim follows that.
ephemient
+4  A: 

Vim documentation

<Undo>   or     *undo* *<Undo>* *u*
u     Undo [count] changes.  {Vi: only one level}

          *:u* *:un* *:undo*
:u[ndo]   Undo one change.  {Vi: only one level}

          *CTRL-R*
CTRL-R    Redo [count] changes which were undone.  {Vi: redraw screen}

          *:red* *:redo* *redo*
:red[o]   Redo one change which was undone.  {Vi: no redo}

          *U*
U     Undo all latest changes on one line.  {Vi: while not
      moved off of it}
geowa4
+6  A: 

Also check out :undolist, which offers multiple paths through the undo history. This is useful if you accidentally type something after undoing too much.

Peter
+1, really nice
LB