如何在执行 :Ex 时阻止 Vim 水平拆分 window

How to stop Vim from splitting window horizontally when doing an :Ex

当我使用 :Ex 打开一个新文件时,Vim 有时决定水平分割 window。我不喜欢那种行为。我更喜欢 Vim 通常做的事情,就是自己打开文件... window,我猜它是在 Vim 中调用的?无论如何,当它不水平分割 window 时。我如何控制 :Ex?

触发的行为

:h是你的朋友。 :h :Ex 向您显示以下内容:

: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|

所以 vim 将拆分 window,如果您还没有保存您的更改。这是为了确保您不会丢失任何东西。我不知道有任何可能将其关闭。您当然可以重新定义 :Ex 以仅放弃或保存更改。