If I use gvim *.c in a directory with multiple C files, gvim opens the next one once I close the one I am looking at.

How do I quit all subsequent files? Meaning I don't want gvim to open any more files.


When I tried the same thing, I got this error message:

E173: 3 more files to edit

I ran :help E173 and read

                        *E173*  >
 {number} more files to edit

You are trying to exit, while the last item in the argument list has not been
edited.  This protects you from accidentally exiting when you still have more
files to work on.  See |argument-list|.  If you do want to exit, just do it
again and it will work.

The command :q! worked for me. So did running :q twice (like the help page indicated).

  • 4
    :qa should also work; the difference being that :q! will also quit on various other error conditions (like the buffer not being written), whereas :qa won't. – Martin Tournoij May 26 '17 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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