An example:
case Foo:
...
break;
case Bar:
...
break;
case More: case Complex:
...
break:
...
I’d like to retrieve al
Though it's not possible to write a one-liner to accomplish your example, it's hard to type commands such as :%s/case \([^:]*\):/\=.../ interactively.
I prefer using vim-grex with the following steps:
/ to check whether a regular expression matches to expected lines.
For example: /^\s*\:Grey. It yanks lines matched to the current search pattern.:new etc.p etc.:%s//\1/.