I want to search for a keyword, and replace a word in the line that is not a search word. I thought macros may be a good way to do it, but I am open to any methods.
I have something like,
blah blah
check abc = 9
blah
check def VS 10
check hi and j = 20
when I have "check", I want to replace the = a few words down in the same line with VS. There are too many = in the file that are unrelated to it to directly search and replace. I want to do this on a large file. I made a macro that contains
/check
s/=/VS/gc
and thought to keep running it by putting a range, or repeat it with pressing a period. When the second search and replace does not always find =, the range seem to stop working after one attempt. In the same case, the period does not work either, because now it skips searching for the check.