Created
May 2, 2024 18:05
-
-
Save petergi/b4f6811d93839cff4b92fa8e7746af51 to your computer and use it in GitHub Desktop.
Display context (5 lines) for all occurrences of a pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Display context (5 lines) for all occurrences of a pattern. | |
:g/pattern/z#.5 | |
" Same, but with some beautification. | |
:g/pattern/z#.5|echo "==========" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment