Tips & Tricks

  • gv goes to the last visual selection

Recently learned about some of the original vi commands like :g that lets you search for lines to perform a command on e.g. :g/foo/d to delete all lines containing foo or :g/foo/s/bar/baz/ to replace instances of “bar” with “baz” if the line it’s on contains “foo”

  • C-a inserts the last insertion

  • ctrl-^ or ctrl-6 to move to the alternative buffer which often times is the previous one