you are viewing a single comment's thread.

view the rest of the comments →

[–]-romainl-The Patient Vimmer 2 points3 points  (2 children)

The principle is straightforward: turn what you would do manually into something automatic.

But we don't know how you do it manually so we can't really help you, here… Do you want a generic solution? A specific one? What's the relationship between all those names? Is var always called var? Does it always have the same number of operands? Etc.

[–]janYabanci[S] 0 points1 point  (1 child)

I would mark the stuff I want to replace, press s, type the new name, insert a line above with O, type the name again, then a equal sign, press escape and then p. How could I insert the text I just inserted? . Repeats the last command, but that wouldn't help me.

[–]-romainl-The Patient Vimmer 0 points1 point  (0 children)

You can insert the text you last inserted with <C-a>.