search

Home  >  Q&A  >  body text

vimrc - How to disable split screen in gvim? Newly opened files sometimes split the screen, but I just want it to appear in the buffer

I couldn't find this problem in the vim help manual. Don't know how to check.

怪我咯怪我咯2776 days ago722

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 16:36:45

    Understand the difference between the following commands:

    • :e filename

    • :sp filename

    • :vsp filename


    Supplement:
    I think you still need to understand the difference between tab, window and buff

    Files read in any way exist in the buff cache area.
    The top and bottom/left and right split screens displayed on the screen are called windows. Is a container for displaying buffs.
    And tab is just a container that displays different window layouts.

    tab can contain any number of windows, and each window displays a buff.
    However, there is no mapping relationship between window and buff, and the same buff can be displayed in multiple windows.

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

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

    As for your question, some commands or plug-ins use split screen by default, that is, split mode to split the window to display content. For example, the :help:options command. This is to facilitate users to view documents or setting items and modify their own configurations at the same time.

    For ordinary hard disk files, you can completely decide how to display them through :e:sp:vsp.

    Use NERDTree插件打开硬盘文件,也可以通过ois three shortcut keys to read and display to the corresponding window using different layouts.

    Relevant setting items are:

    • :set splitright

    • :set splitbelow

    Please tell me how you opened the hard drive file.

    reply
    0
  • Cancelreply