I want to be able to use the following code
if ($ something) { do something }
and do it
if ($ somthing) { do something }
through the entire file without going to each statement and correcting it. I am not a regular expression guru, so any help would be appreciated :)
Use PEAR PHP_Beautifier to reformat your code.
You can:
Find a line containing if , but not ending in { :
if
{
/if [^{]*$
Attach this line to the following:
J
You can match this sequence with something:
nmap <F2> /if[^{]*$<CR>J
so that each press of F2 changes the next one if the instance ( 100 F2 will change 100 instances, etc.).