To remove everything that is inside a pair of parentheses, you can always give di( and its derivatives.
Note:
As @porglezomb explained in his comment, you can use a ("along with") instead of i ("inside") to include parentheses. Thus, using da( removes everything inside ( and ) including ( and ) .
Removing text inside an immediate outer pair of parentheses:
So for this line of code
printf("%3.0f\t%6.1f\n", fahr, ((5.0/9.0) * (fahr-32))); ^ ^ | | \_______\___---> Cursor range
Assuming your cursor is inside the specified cursor range, you can run the following commands:
di( --> Deletes '5.0/9.0' ci( --> Substitutes '5.0/9.0' yi( --> Yanks '5.0/9.0'
Removing text inside the nth outer pair of parentheses:
To capture everything inside the nth outer pair of parentheses, just add n before the specified command. So, with the same cursor position as above,
2di( --> Deletes '(5.0/9.0) * (fahr-32)' 2ci( --> Substitutes '(5.0/9.0) * (fahr-32)' 2yi( --> Yanks '(5.0/9.0) * (fahr-32)' 3di( --> Deletes '"%3.0f\t%6.1f\n", fahr, ((5.0/9.0) * (fahr-32))' 3ci( --> Substitutes '"%3.0f\t%6.1f\n", fahr, ((5.0/9.0) * (fahr-32))' 3yi( --> Yanks '"%3.0f\t%6.1f\n", fahr, ((5.0/9.0) * (fahr-32))'
Kevin Jul 27 '14 at 9:51 2014-07-27 09:51
source share