如何在Vim中进行重做(即“撤消撤消”)?

馋奶兔 提交于 2019-12-26 18:37:39

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

在Vim中,我做了太多的撤消。 如何撤消此操作(即重做)?


#1楼

奇怪没有人提到:earlier / :later 。 要重做你需要做的一切

later 9999999d

(假设您最初在9999999天前编辑了该文件),或者,如果您还记得当前撤消状态与所需撤消状态之间的差异,请分别使用NhNmNs表示小时,分钟和秒。 + :later N<CR> <=> Ng+:later Nf用于文件写入。


#2楼

Ctrl + r


#3楼

在命令模式下,使用U键撤消,使用Ctrl + r重做。 请访问http://www.vim.org/htmldoc/undo.html


#4楼

CTRL + r

“r”是小写的。


#5楼

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}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!