如何重复Vim中的最后n个更改?
发布时间:2020-12-15 09:21:07 所属栏目:安全 来源:网络整理
导读:做。重复最后一次更改。执行2.重复最后一次更改2次。但想象一下,我想在最后一个之前重复这个变化,我该如何在Vim中做呢? 谢谢 不要以为你可以,见:帮助。但是,您可以做的是为您的编辑记录一个宏,您有很多寄存器可供选择{0-9a-zA-Z“}(大写或追加)。 然
做。重复最后一次更改。执行2.重复最后一次更改2次。但想象一下,我想在最后一个之前重复这个变化,我该如何在Vim中做呢?
谢谢
不要以为你可以,见:帮助。但是,您可以做的是为您的编辑记录一个宏,您有很多寄存器可供选择{0-9a-zA-Z“}(大写或追加)。
然后使用@u用于编辑1,@t用于编辑2等。 关于录音从Best of VIM Tips的大提示 " Recording (BEST TIP of ALL) qq # record to q your complex series of commands q # end recording @q to execute @@ to Repeat 5@@ to Repeat 5 times qQ@qq : Make an existing recording q recursive *N* " editing a register/recording "qp :display contents of register q (normal mode) <ctrl-R>q :display contents of register q (insert mode) " you can now see recording contents,edit as required "qdd :put changed contacts back into q @q :execute recording/register q 看看这些有更多的提示重复: :& last substitute :%& last substitute every line :%&gic last substitute every line confirm g% normal mode repeat last substitute g& last substitute on all lines @@ last recording @: last command-mode command :!! last :! command :~ last substitute :help repeating (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |