Skip to content

Instantly share code, notes, and snippets.

@petergi
Last active May 2, 2024 18:19
Show Gist options
  • Save petergi/b14b131124859f0260679c9fa6f868ad to your computer and use it in GitHub Desktop.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment