Đừng nghĩ rằng bạn có thể, xem :help .
Tuy nhiên, những gì bạn có thể làm là ghi lại macro cho chỉnh sửa, bạn có nhiều sổ đăng ký để chọn từ {0-9a-zA-Z"}
(chữ hoa để nối thêm). Sau đó sử dụng ví dụ: @u
để chỉnh sửa 1, @t
để chỉnh sửa 2, v.v.
lời khuyên tuyệt vời về ghi từ 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
[email protected]@ to Repeat 5 times
[email protected] : 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
Hãy nhìn vào những để biết thêm gợi ý cho lặp đi lặp lại:
:& 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
Nguồn
2011-07-10 22:34:46
Điều đó có vẻ là một tính năng tuyệt vời để yêu cầu. (http://www.vim.org/sponsor/vote_results.php); Tôi muốn có 'cỗ máy thời gian' như ghi macro thực tế sau – sehe