在Vim中,我做了太多撤销操作。我如何撤销这个(即,重做)?
当前回答
Vim文档
<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}
其他回答
首先按Esc键退出编辑模式。
然后,
对于撤销,使用你想撤销的任意次数的u键。
重做时,使用Ctrl +r键
CTRL + r
“r”是小写的。
Vim文档
<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}
使用方法:早/:后来。重做所有你需要做的事情
later 9999999d
(假设您在9999999天前第一次编辑该文件),或者,如果您记得当前撤消状态和需要撤消状态之间的差异,请分别使用Nh、Nm或Ns表示小时、分钟和秒。+:later N<CR> <=> Ng+和:later Nf用于文件写入。
还可以查看:undolist,它提供了通过撤消历史的多条路径。如果你在撤消太多操作后不小心输入了一些东西,这是很有用的。