Joh*_*kin 878
Ctrl+r
Pet*_*ter 129
还可以查看:undolist
,它提供了撤消历史记录中的多条路径.如果您在撤消太多后意外键入内容,这将非常有用.
ZyX*_*ZyX 52
奇怪没有人提到:earlier
/ :later
.要重做你需要做的一切
later 9999999d
Run Code Online (Sandbox Code Playgroud)
(假设你第一次编辑的文件最多9999999天前),或者,如果你还记得当前撤销状态之间的差异,一个,使用需要Nh
,Nm
或者Ns
几个小时,分钟和秒分别.+ :later N<CR>
<=> Ng+
和:later Nf
文件写入.
geo*_*wa4 42
<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}
Run Code Online (Sandbox Code Playgroud)
Xin*_*nus 26
在命令模式下,使用U键撤消和Ctrl+ r重做.请访问http://www.vim.org/htmldoc/undo.html.
小智 10
请参阅vim文档的"撤消"和"重做"部分.
:red [o](重做一次撤消的更改)和{count} Ctrl+ r(重做{count}撤消的更改)都可以.
此外:较早的 {count}(转到较旧的文本状态{count}次.)始终可以替代撤消和重做.