I’m sure there used to be a plugin for this kinda stuff, but now that I need it, I can’t seem to find it (naturally), so I’ll just ask nice and simple.
What is the easiest way to select between brackets, or quotes, or generally a list of matching characters?
write ( *, '(a)' ) 'Computed solution coefficients:'
For example, here I’d like to select (a), or Computed solution coefficients:.
I’m not interested in multiline, just cases which occur on one line.
Use whatever navigation key you want to get inside the parentheses, then you can use either
yi(oryi)to copy everything within the matching parens. This also works with square brackets (e.g.yi]) and curly braces. In addition toy, you can also delete or change text (e.g.ci),di]).I tried this with double and single-quotes and it appears to work there as well. For your data, I do:
Move cursor to the
C, then typeyi'. Move the cursor to a blank line, hitp, and getAs CMS noted, this works for visual mode selection as well – just use
vi),vi},vi', etc.