I frequently use vim to edit multiple files. On the command line, I'll type vim *
or the like, and use :wn
to move through the files until I get to the end.
Invariably, I get to the last file, and type :wn
and get the maddening message E165: Cannot go beyond last file
, when really what I want vim to do is quit at that point (:wq
). Is there a configuration that controls this behavior?
:wn
and it does:wn
. If you want it to do:wq
, don't tell it to do:wn
, tell it to do:wq
.