views:

56

answers:

2

I often take a look at help files in Vim, but sometimes I want to read one in full screen. Since the :help command opens it in a new window, and closing the old window, if it was the only one besides of the help file, for some reason closes Vim, the only way I found of doing this was opening the help file, and then reopening it in a new tab.

I wondered, is there any way to make the :help command (or another command) to open a help file in the same window, but a new buffer?

+1  A: 

You can use :help to open the help window, then Ctrl+W_ to make that window full screen (mostly, see the winminheight option).

Greg Hewgill
Wow, I had no idea that you could set winminheight=0 for hiding a Window!While its a great trick, there will *still* be a little bar with the title of the old window, thats why my question was about opening a new buffer :P
Martín Fixman
+2  A: 

You might be looking for :only or CTRL-W o (the same command). This makes the current window the only one on the screen. All other windows are closed.

You can also vertically split the help window with:

:vert help {subject}

BTW, :help actually does open in a new buffer, it's just "unlisted". To list all buffers, including the unlisted ones:

:buffers!
Curt Nelson
This was exactly what I needed, Thank you!
Martín Fixman