I am sure this is easy, I am just missing a character or two.
I need to search for a particular term in a file, and when I find it, I need to append something to that
:%s/green/bright &/g
: Replace each "green" with "bright green" in the file.
&
: substitute matched string
. You can do anything you can imagine.
You can use the flag \v
so we don't have to use as many escape characters.
append the parameter --no-startup-id
after exec
or exec_always
:%s/exec\(_always\)\?/& --no-startup-id/g
simplify it:
:%s/\vexec(_always)?/& --no-startup-id/g