I'll use something similar when I rebase (to squash) a series of commits in a git repo (vim's my editor for Git). If when presented with the list of commits you do:
:2,$s/pick/s/g
You'll squash all commits into a single commit in one fell swoop.
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
Don't Exit Vim has got to be my favourite so far.
Pro tip: ESC + :wq = exit vim
Another other pro tip, that's bound to just
ZZ
, withough a colon.Another pro tip! There is a shortcut for
:wq
—:x
Another pro tip for regex:
I'll use something similar when I rebase (to squash) a series of commits in a git repo (vim's my editor for Git). If when presented with the list of commits you do:
You'll squash all commits into a single commit in one fell swoop.
To be fair, any reference to Vim being hard to quit is always a cheap win.
As a regular vim user, the cheapest win for me is emacs.
agreed