'b bounding some lines of text. I want to convert all the
m variables to upper case. A sample line:
f(w,h,n,m) | w <= 0 | h <= 0 | n < 0 | m < 0 = 0
It seems to me that this should work:
:'a,'b g/\<[whnm]\>/normal ~
This doesn't work. It matches the line, but does not match the individual variables. It leaves the cursor at the beginning of the line and capitalizes the
f there. How do I make it perform the
~ action at every match in the range?
I know this particular example can be done simply with a regex substitution. I don't want to do that. I want to run an arbitrary command at every location that matches a search pattern, which seems like something obvious to do, but so far appears impossible to do in vim.