Skip to content

Instantly share code, notes, and snippets.

@mechanicles
Last active January 1, 2016 03:39
Show Gist options
  • Save mechanicles/8086490 to your computer and use it in GitHub Desktop.
Save mechanicles/8086490 to your computer and use it in GitHub Desktop.
Vim Tips:
**g-**
There are a lot of better answers already given (".", "*", and "%" are far more useful), but I vote for "g-" because it is relatively new and feels like magic. Somehow, it always seems to go to the exact text state I want.
Basically, if you make a lot of edits, then undo them, then make one more edit, then decide you want the first set of edits back, most editors can't do it. Emacs can, but it's a pain. g- in Vim will usually take you straight there. {not in Vi}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment