Created
April 8, 2026 15:53
-
-
Save petergi/839558fa59dadf40335b67c9f3680a53 to your computer and use it in GitHub Desktop.
Reverse entire file. The first pass of :g marks every line matching {pattern}, while the second pass (again starting at the file's beginning and proceeding to the end) performs the [cmd]. Note: if :g processed lines in any order other than from top to bottom, this command would not work.
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
| :g/^/m0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment