I am browsing the files in vim file explorer by entering
Then I am opening the file, saving and closing it by entering
Now the file explorer window disappears.
How to prevent this behavior?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
:quit command (also as part of
:wq) quits Vim if this is the last window. As you use
:Explore, the opened file replaces the netrw explorer, and exiting Vim is the result.
If you want to keep the file explorer, you can open it in a split window, with
:Vex (vertical split) or
:Sex (horizontal split). That way, when you close the file, another window is still open and Vim won't quit.
Also, inside a netrw explorer, if you open the file with
v instead of
<Enter>, the explorer will be kept and the file opened in a split; cp.
:help netrw-browse-maps. You could also reconfigure the default behavior on