VimAddin icon indicating copy to clipboard operation
VimAddin copied to clipboard

Support vim-like substitution

Open japboy opened this issue 11 years ago • 3 comments

Please support vim-like search and replace:

Like this:

:%s/Foo/Bar/cg

japboy avatar Jul 23 '14 02:07 japboy

I'm looking into it now. The command format should look like

:[range]s/{pattern}/{string}/[flags]

but currently, a range is not expected and needs to be parsed.

alextsui05 avatar Jul 23 '14 03:07 alextsui05

This feature is still not done yet, but please make use of this workaround for now, using features available in the addin as of version 1.1:

  1. Place the cursor over the token you would like to replace.
  2. Press [#] or [*] to search for it. This will highlight all instances of the token.
  3. Use [cw] to replace the token with the new string that you want.
  4. Use [n] to go to the next instance of the token.
  5. Use [.] to replace the token with the string that you typed previously.
  6. Repeat steps 4-5 until all instances are replaced.

alextsui05 avatar Jul 28 '14 02:07 alextsui05

:+1:

japboy avatar Jul 28 '14 04:07 japboy