2

I did vim * to simultaneously open 3 text files, as I would with any other application. However, when I use :q to close the first file, it does not close, and instead says E173: 2 more files to edit. How can I fix this so that I can access each file, and then close the whole thing?

1
  • 2
    You might try asking this over at Vi and Vim.SE. Stack Overflow is for programming questions. Vi questions aren't off-topic here but it's not the best site to ask on. Commented May 27, 2020 at 17:42

2 Answers 2

2

Two possibilities that I can think of:

  • simply run :q again, vi will close
  • run :qa (quit, all)
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I wasn't clear with my question, but you got half of what I was trying to ask!
1

You don't have multiple instances of vim, just a single one with three buffers.

Use :n to close the first file and go to the next, or :wn to save and go next. :prev goes backwards.

You can also use :2b to jump to buffer #2, and/or set up a plugin like MiniBufExpl to show a list of currently opened files for easier navigation.

1 Comment

Thanks. I wasn't clear with my question, but you got half of what I was trying to ask!

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.