Cancel split window in Vim

前端 未结 10 1148
小鲜肉
小鲜肉 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条回答
  • 2021-01-29 18:37

    Two alternatives for closing the current window are ZZ and ZQ, which will, respectively, save and not save changes to the displayed buffer.

    0 讨论(0)
  • 2021-01-29 18:37

    I found that ctrl + w to the window you want to close, then just do :q. This works for me.

    0 讨论(0)
  • 2021-01-29 18:39

    From :help opening-window (search for "Closing a window" - /Closing a window)

    • :q[uit] close the current window and buffer. If it is the last window it will also exit vim
    • :bd[elete] unload the current buffer and close the current window
    • :qa[all] or :quita[ll] will close all buffers and windows and exit vim (:qa! to force without saving changes)
    • :clo[se] close the current window but keep the buffer open. If there is only one window this command fails
    • :hid[e] hide the buffer in the current window (Read more at :help hidden)
    • :on[ly] close all other windows but leave all buffers open
    0 讨论(0)
  • 2021-01-29 18:39

    Okay I just detached and reattach to the screen session and I am back to normal screen I wanted

    0 讨论(0)
提交回复
热议问题