If I open multiple files in vi using vi *.py then how do I exit the whole vi session instead of editing each and every file? Seems like a simple enough issue but can't find anything on google.
Asked
Active
Viewed 4,096 times
3
Salil Surendran
- 171
1 Answers
7
You can quit from all open files (buffers) by :qa or :qa! In vim. The exclamation mark means to force quit the edited unsaved file.
Also there's ZQ and ZZ shortcuts to quit and save quit respectively, though I'm not sure if they would quit all files as unfortunately have never came to check.
:qallin vim, but not vi. Lots of systems use vi as a link to vim – DJMcMayhem Nov 22 '16 at 21:32