Terminal Neovim and Neovim-qt has support for :{N}cq, which quits the Neovim with error code {N}. This feature is useful in applications which uses editor as a user interface --- especially git. For example, it can safely abort git commit during editing commit message, since git aborts committing if editor returns non-zero exit code. You can abort a commit by simply typing :q! without saving commit message, but :cq is safer in a sense that it will abort the commit message even if you unintentionally save it while editing. Same goes for git rebase -i and many other git commands.
Terminal Neovim and Neovim-qt has support for
:{N}cq
, which quits the Neovim with error code {N}. This feature is useful in applications which uses editor as a user interface --- especially git. For example, it can safely abortgit commit
during editing commit message, since git aborts committing if editor returns non-zero exit code. You can abort a commit by simply typing:q!
without saving commit message, but:cq
is safer in a sense that it will abort the commit message even if you unintentionally save it while editing. Same goes forgit rebase -i
and many other git commands.