How to repeatedly add text on both sides of a word in vim?
问题 I have a bunch of local variable references in a Python script that I want to pull from a dictionary instead. So, I need to essentially change foo , bar , and others into env['foo'] , env['bar'] and so on. Do I need to write a regular expression and match each variable name to transform, or is there a more direct approach that I could just repeat with the . command? 回答1: You can use a macro: type these commands in one go (with spacing just to insert comments) " first move to start of the