|
|
|
|
|
by mawww
3881 days ago
|
|
Hello, If you get your selections through a regex, you will have access to capture groups in registers 0..9 (which will store the correct match for each selections), so to do the change you wanted, you'll type (in normal mode, no ':'): %sfoo\(([^,]+), ([^)]+)\)<ret> # select whole buffer, then select all regex matches cbaz(<c-r>2).foo(<c-r>1)<esc> # enter insert mode, <c-r> recalls a register I have been meaning to do a screencast at some point, or maybe I could do a twitch Q/A session. |
|