我有許多行的文本文件。如何有條件地移動排隊?
test =
more text more text more text more text
more text more text more text more text
... etc....
more text more text more text more text
more text more text more text more text
1 text
test2 =
more text more text more text more text
more text more text more text more text
3 more text
等
我想要做的是移動線'開始的數 並附他們的第一行後發現(倒退),與「= \ s」的
結束預計產出:
test = 1 text
more text more text more text more text
more text more text more text more text
... etc....
more text more text more text more text
more text more text more text more text
test2 = 3 more text
more text more text more text more text
more text more text more text more text
我不知道該怎麼做。
有人可以幫助我嗎?
與我的宏觀相同的想法。但是:g命令會比宏命令好。 +1 – Kent
Vim golf:':g/^ \ d/m?。* = $ | -j' –
非常感謝romainl! – Reman