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?
-
2You 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.John Kugelman– John Kugelman2020-05-27 17:42:59 +00:00Commented May 27, 2020 at 17:42
Add a comment
|
2 Answers
Two possibilities that I can think of:
- simply run :q again, vi will close
- run :qa (quit, all)
1 Comment
jonnybolton16
Thanks. I wasn't clear with my question, but you got half of what I was trying to ask!
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
jonnybolton16
Thanks. I wasn't clear with my question, but you got half of what I was trying to ask!