Vim Tips Wiki
(note about U)
(wrong case for Redo)
Line 14: Line 14:
 
*<tt>u</tt>: undo last change (can be repeated to undo preceding commands)
 
*<tt>u</tt>: undo last change (can be repeated to undo preceding commands)
 
*<tt>U</tt>: return the line to its original state (undo all changes in current line)
 
*<tt>U</tt>: return the line to its original state (undo all changes in current line)
*<tt>CTRL-R</tt>: Redo changes which were undone (undo the undos). Compare to '<tt>.</tt>' to ''repeat'' a previous change, at the current cursor position. CTRL-R will redo a previously undone change, wherever the change occurred.
+
*<tt>CTRL-r</tt>: Redo changes which were undone (undo the undos). Compare to '<tt>.</tt>' to ''repeat'' a previous change, at the current cursor position. CTRL-R will redo a previously undone change, wherever the change occurred.
   
 
Note that (somewhat confusingly) <tt>U</tt> is undo-able with <tt>u</tt>.
 
Note that (somewhat confusingly) <tt>U</tt> is undo-able with <tt>u</tt>.

Revision as of 00:42, 18 March 2010

Tip 39 Printable Monobook Previous Next

created 2001 · complexity basic · version 5.7


To undo recent changes, use the u[ndo] command:

  • u: undo last change (can be repeated to undo preceding commands)
  • U: return the line to its original state (undo all changes in current line)
  • CTRL-r: Redo changes which were undone (undo the undos). Compare to '.' to repeat a previous change, at the current cursor position. CTRL-R will redo a previously undone change, wherever the change occurred.

Note that (somewhat confusingly) U is undo-able with u.

References

Comments