Showing posts with label 2 patterns. Show all posts
Showing posts with label 2 patterns. Show all posts

25 January 2026

Vim global command - how to apply 2 or more patterns?

:g/====\|----/-1p

Prints the line above all the lines with '====', and the line above all the lines with '----'