3 ms·
`:cq` exits vim with exit code 1. This is useful if you're in vim to write a git commit message and you realize don't actually want to commit. Or you're in vim
by williamsmj 4y ago
`:cq` exits vim with exit code 1.
This is useful if you're in vim to write a git commit message and you realize don't actually want to commit. Or you're in vim from `fc` to edit a shell command and you realise you don't actually want to run it.
- turtleyacht 4y agoThank-you. That beats `HdG :wq` to delete everything and abort the commit.
- wruza 4y agoVCSs usually abort a commit if a temporary message file remains unmodified, so :q! is fine too.
- drudru 4y agoAgreed. I use this all the time.