Last active
May 2, 2024 18:19
-
-
Save petergi/b14b131124859f0260679c9fa6f868ad 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