连续撤消 vi

发布于 2024-09-06 03:48:13 字数 170 浏览 7 评论 0原文

我正在使用 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 Ufor 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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

逐鹿 2024-09-13 03:48:13

使用 . 键重复撤消操作。

Repeat the undo, with the . key.

血之狂魔 2024-09-13 03:48:13

可能无法在 3.1 版本中工作。

连续撤消堆栈弹出等操作

u . . . 

假设您在插入模式下写入 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

u . . . 

Suppose you write hello in insert -mode. Go to normal mode, write hallo and go to normal mode. Then type u ., you get hello. Type again . and you will get blank. You can reverse it by typing again u . . so you will get hello 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 be undo. When you press u u, it does mean undo the last command: undo last command and the second u means undo 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文