2 ms·
What do you mean by "n"? Moving to the next position in a search? You can structure a macro to end with going to the position of next edit. Then you can hit 100
by qqqw 13y ago
What do you mean by "n"? Moving to the next position in a search? You can structure a macro to end with going to the position of next edit. Then you can hit 100@@ or whatever and do all of the edits in one go.
- sillysaurus2 13y agoMost of the time you want to individually review each instance of what the macro is doing before invoking it, so 100@@ is rarely used. (At least by me.)
- belden 13y agoMacros in vim can call themselves; so if you want to make an edit across an entire file, something like: <esc>qqq //clear q macro qq //start recording q macro /foo // search for something 3clbar // do some edit @q // call q macro q //done recording @q //invoke q macro No need to guess how many times to call your macro.