Cancel split window in Vim

前端 未结 10 1173
小鲜肉
小鲜肉 2021-01-29 18:07

I have split my windows horizontally. Now how can I return to normal mode, i.e. no split window just one window without cancelling all of my open windows. I have 5 and do not wa

10条回答
  •  旧时难觅i
    2021-01-29 18:23

    To close all splits, I usually place the cursor in the window that shall be the on-ly visible one and then do :on which makes the current window the on-ly visible window. Nice mnemonic to remember.


    Edit: :help :on showed me that these commands are the same:

    • :on
    • :only
    • CTRL-w CTRL-o
    • And yes, also CTRL-W o has the same effect (as Nathan answered).

    Each of these four closes all windows except the active one.

提交回复
热议问题