做。重复最后一次更改。执行2.重复最后一次更改2次。但想象一下,我想在最后一个之前重复这个变化,我该如何在Vim中做呢?
谢谢
不要以为你可以,见:帮助。但是,您可以做的是为您的编辑记录一个宏,您有很多寄存器可供选择{0-9a-zA-Z“}(大写或追加)。
然后使用@u用于编辑1,@t用于编辑2等。
然后使用@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