vimtricks.wiki Concise Vim tricks, one at a time.

How do you print all lines matching a pattern?

Answer

:g/pattern/p

Explanation

Use :g/pattern/p to print all matching lines. Shorthand :g/pattern/ also works since p (print) is the default action.

Next

How do I visually select a double-quoted string including the quotes themselves?