在Vim中,我做了太多撤销操作。我如何撤销这个(即,重做)?


当前回答

其他回答

首先按Esc键退出编辑模式。

然后,

对于撤销,使用你想撤销的任意次数的u键。

重做时,使用Ctrl +r键

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

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}