I know ZZ will write and quit, and ZQ will quit without saving. Is there another such command to write the buffer without doing anything else, or should I map one myself? I'd like to know if there's something I know will work on other people's Vim configurations.

  • not in vim, not sure about neovim.
    – Maxim Kim
    Commented Jan 7 at 23:28
  • I don't understand the "other people's configurations" part. Are you writing a plugin and concerned it will play nicely? If so, stick to the built-in commands. There's no way of knowing who puts what in their vimrcs or plugins.
    – Friedrich
    Commented Jan 8 at 17:53
  • Do you have still something open in your question? How can we help you further? Otherwise maybe could you accept one of the solution using the v button next to the arrow voting buttons. It allow the question to rest :-) Commented Jan 10 at 20:43

2 Answers 2


I would just create a mapping like :nnoremap ZW <Cmd>write<CR>.

Having said that, :w<CR> has always seemed reasonably short to me.


Not that I'm aware.

The documentation gather the commands and their corresponding shortcut:

  • ZZ is close to :x
  • ZQ is close to :q!

I suppose any shortcut should be close to :w :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.