How does gvim prohibit split screen? The newly opened file is sometimes divided into screens, but I just want it to appear in buffer.

  question, vim

clipboard.png

This kind of problem was not found in vim’s help manual. I don’t know how to find out.

Find out the difference between the following commands:

  • :e filename

  • :sp filename

  • :vsp filename


Add:
I think you need to make clear the difference between tab, window, buff.

Files read in any way exist in the buff cache.
The up/down/left/right split screen displayed in the screen is called window. Is the container that displays buff.
Tab, on the other hand, only shows containers with different window layouts.

Tab can contain any number of windows, and each window displays one buff.
However, there is no mapping relationship between window and buff. Multiple Windows can display the same buff.

Open vim without any parameters. What you see is an empty content buff, which is displayed in a maximized window, which exists in a tab.

Simply put, tab contains window, which displays buff. Tab and window are both displayed containers.
The files you open, or the content generated by the plug-in, correspond to buff and have nothing to do with window.

As for your question, some commands or plug-ins use split screen by default, that is, split the window display content. such as:help,:optionsOrders. This is to make it easier for users to view documents or setup items while modifying their own configuration.

Ordinary hard disk files, can completely through:e,:sp,:vspDecide how to display it.

viaNERDTreeThe plug-in opens the hard disk file, also can pass througho,i,sThe three shortcut keys use different layouts to read and display to the corresponding window.

Related settings are:

  • :set splitright

  • :set splitbelow

How did you open the hard disk file?