连续撤消 vi
我正在使用 vi(不是 Vim),并且我想不断撤消所做的更改。 u
适用于单个命令撤消,U
适用于单行撤消。但是有没有办法像 vim 一样连续撤消(我记得 vim 中的一个命令甚至可以按时间撤消更改!)? 提前致谢。
编辑: 我使用的是 vi 版本 3.10
I am using vi(not Vim) and I would like to continually undo the changes made. u
works for a single command undo and U
for a single line undo. But Is there a way to undo continuously like vim(I recall a command in vim can even undo changes by time!) in vi?
Thanks in Advance.
Edit:
I am using vi version 3.10
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
.
键重复撤消操作。Repeat the undo, with the
.
key.可能无法在 3.1 版本中工作。
连续撤消堆栈弹出等操作
假设您在插入模式下写入
hello
。进入正常模式,输入hallo
并进入正常模式。然后输入u .
,您会得到hello
。再次输入.
,您将得到空白。您可以通过再次输入u 来反转它。 .
所以你会得到hello hello
。它很容易记住,因为它的工作原理就像堆栈一样!即撤消
重复最后一个命令
重复最后一个命令
其中重复最后一个命令可以撤消
。当您按u u
时,它确实意味着撤消最后一个命令
:撤消最后一个命令
,第二个u
表示< code>撤消最后一个命令,在本例中是 u。使用
Nvi 版本 1.79 (10/23/96) CSRG、加州大学伯克利分校
、OpenBSD 进行测试。您可以在此处获取源代码。< /em>May not work in 3.1 version.
Undo continually things like stack-popping
Suppose you write
hello
in insert -mode. Go to normal mode, writehallo
and go to normal mode. Then typeu .
, you gethello
. Type again.
and you will get blank. You can reverse it by typing againu . .
so you will gethello hallo
. It is very easy to memorize because it works like stacks! I.e.undo
repeat the last command
repeat the last command
where the repeat the last command can beundo
. When you pressu u
, it does meanundo the last command
:undo last command
and the secondu
meansundo the last command and in this case it is u
.Tested with
Nvi Version 1.79 (10/23/96) The CSRG, University of California, Berkeley
, OpenBSD. You can get the source here.