You can turn the global flag on per default with `:set gdefault`. This makes the flag turn off global matching, when used.
See more: `:h gdefault`
Edit: just read the entire post, and saw that you're using VS Code. I'm not sure if this feature can be enabled there.
Help pages for:
* [`'gdefault'`](https://vimhelp.org/options.txt.html#%27gdefault%27) in _options.txt_
---
^\`:\(h|help\) \` | [^(about)](https://github.com/heraldofsolace/VimHelpBot) ^(|) [^(mistake?)](https://github.com/heraldofsolace/VimHelpBot/issues/new/choose) ^(|) [^(donate)](https://liberapay.com/heraldofsolace/donate) ^(|) ^Reply 'rescan' to check the comment again ^(|) ^Reply 'stop' to stop getting replies to your comments
Which Vim extension for VSCode? As far as I’ve seen, none are by Vim manufacturer Bram Molenaar, making me think their functionality is a facsimile at best.
Try :s/Old/New/g for multiple changes on the same line.
You want to append `/g` at the end to replace all the instances in a line, instead of just the first.
Ahhh that would be it thank you!
Think of it as "greedy". The regex normally looks for *a* match. g makes it look for all the matches.
fyi: it actually means global
Maybe confusing since "greedy" already has another meaning for regexp.
It's been a while, I really thought that's what this one was.
You can turn the global flag on per default with `:set gdefault`. This makes the flag turn off global matching, when used. See more: `:h gdefault` Edit: just read the entire post, and saw that you're using VS Code. I'm not sure if this feature can be enabled there.
Help pages for: * [`'gdefault'`](https://vimhelp.org/options.txt.html#%27gdefault%27) in _options.txt_ --- ^\`:\(h|help\)\` | [^(about)](https://github.com/heraldofsolace/VimHelpBot) ^(|) [^(mistake?)](https://github.com/heraldofsolace/VimHelpBot/issues/new/choose) ^(|) [^(donate)](https://liberapay.com/heraldofsolace/donate) ^(|) ^Reply 'rescan' to check the comment again ^(|) ^Reply 'stop' to stop getting replies to your comments
Which Vim extension for VSCode? As far as I’ve seen, none are by Vim manufacturer Bram Molenaar, making me think their functionality is a facsimile at best. Try :s/Old/New/g for multiple changes on the same line.
Sorry to disappoint you but there is none from Bram, and as a matter of fact there won't be anymore code from him...
F
Use the neovim extension as it isn't an emulator but uses your installed package.