1

I often use sessions to edit and track files in a project. I almost always type :q when I'm done working and end up closing the buffer I was last working on when what I want to do is close all buffers and quit vim.

Is there a native way to close all buffers of a session with a single command rather than just the active buffer?

1
  • 1
    Q: "Is there a variant of <thing> that works a bit differently?" A: :help <thing> and scroll around."
    – romainl
    Feb 6, 2023 at 9:09

1 Answer 1

5

You can use:

:qa

for quit all or

:qa!

The later forces to quit Vim even if some buffer modifications have nor been saved.

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.