Reputation: 5285
When I use :Ex to open a new file, Vim sometimes decides to split the window horizontally. I don't like that behavior. I prefer what Vim usually does, which is to open the file in its own... window, I guess it's called in Vim? Anyway, when it doesn't split the window horizontally. How can I control what behavior is trigger by an :Ex?
Upvotes: 0
Views: 152
Reputation: 6026
Well :h
is your friend. :h :Ex
shows you the following:
:Explore will open the local-directory browser on the current file's directory (or on directory [dir] if specified). The window will be split only if the file has been modified and |'hidden'| is not set, otherwise the browsing window will take over that window. Normally the splitting is taken horizontally. Also see: |netrw-:Rexplore|
So vim will split the window, if you haven't saved your changes. This is to ensure, that you don't lose anything. I am not aware of any possibility to turn it off. You could of course redefine :Ex
to just discard or save changes.
Upvotes: 2