DEV Community

Discussion on: If DEV were an acronym, what would it stand for?

Collapse
 
michaelgv profile image
Mike • Edited

Don't Exit Vim has got to be my favourite so far.


Pro tip: ESC + :wq = exit vim

:w = Write
:q = Quit
:wq = Write buffer and quit
Collapse
 
atomicwrites profile image
David Castro

Another other pro tip, that's bound to just ZZ, withough a colon.

Collapse
 
kossnocorp profile image
Sasha Koss

Another pro tip! There is a shortcut for :wq:x

Thread Thread
 
michaelgv profile image
Mike

Another pro tip for regex:

:%s/term/replacement/g
Thread Thread
 
pzelnip profile image
Adam Parkin

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.

Collapse
 
avalander profile image
Avalander

To be fair, any reference to Vim being hard to quit is always a cheap win.

Thread Thread
 
michaelgv profile image
Mike

As a regular vim user, the cheapest win for me is emacs.

Thread Thread
 
moopet profile image
Ben Sinclair

Robert Burns

Thread Thread
 
pandademic profile image
Pandademic

agreed