@oheard definitely this command is useful and easy to implement, I'll add this ASAP.
That is a large number of reactions. This looks like a good one to prioritize, @rebornix.
ha, didn't notice so many people drop reactions on it. Fixed via #525.
Is this in the latest release? I'm running 0.1.5.
I /think/ there's a change in that now when text is selected I can run the substitution command whereas I don't think I could before. The substitution is performed only on the first line however instead of line-by-line.
So for instance, if I have the following two lines selected...
foobar
foobaz
...then run s/foo/quirk/ only 'foobar' is changed to 'quirkbar'.
Using the /g modifier also only replaces the first line, leading me to believe that this is taking into account only the first line.
Thanks for looking into this. :-)
@oheard My exact steps are:
I type in
foobaz
Then I hit : which prefills '<,'> for me. I type the full command '<,'>s/foo/quirk/ and hit enter and the text is changed to:
quirkbaz
Is that what you are doing?
(Note that if you delete '<,'>, only the first of the two foos will be replaced with quirk, just like in Vim. It's kind of unfortunate since the textbar autoselects it - @rebornix, is there any way to work around that?)
Well spotted @johnfn. I didn't notice the prefilled/selected '<,'> because naturally as soon as I type ':' I immediately type 's', clearing the input.
Thanks for the feedback.
Cool, no worries @oheard!
@rebornix - is there any workaround here?
@johnfn Code always selects the placeholder input so it's impossible right now. But I've already filed an issue there https://github.com/Microsoft/vscode/issues/10582 and it's verified.
Most helpful comment
@oheard definitely this command is useful and easy to implement, I'll add this ASAP.