How do I open :help in a new tab?

1 view
Skip to first unread message

sergio acosta

unread,
Nov 19, 2008, 9:45:15 PM11/19/08
to vim_use
This is kind of a vim newbee question.

I don't like that the :help command opens always in a split window. I
would like to be able to have it open in a new tab.

Is there any way to force it to open in a new tab, or at least in the
current full window? (in that case I can open a new empty tab before
calling :h )

I find that even if I first create a new tab with an unnamed,
unmodified document, the help window will open in a split.

And I know I could do the following:

1.- Open a new tab
2.- :help 'whatever-subject'
3.- <C-W>, o

But that's too many keystrokes

thanks in advance for any suggestions

John Beckett

unread,
Nov 19, 2008, 11:44:20 PM11/19/08
to vim...@googlegroups.com
sergio acosta wrote:
> I don't like that the :help command opens always in a split
> window. I would like to be able to have it open in a new tab.

Much to my surprise, I just tried the following and it did what you want:

:tab h pattern

John

Tony Mechelynck

unread,
Nov 20, 2008, 12:06:12 AM11/20/08
to vim...@googlegroups.com

Nothing surprising in that. The ":tab" prefix will open a new tab in
place and stead of a split-window for every commands that opens one
except :diffsplit, :diffpatch, :execute or :normal.

Similarly, ":bot h" will open the help window (if there isn't one yet)
at the very bottom, ":vert h" will split it vertically, etc.

Best regards,
Tony.
--
"An ounce of prevention is worth a pound of purge."

Sergio Acosta

unread,
Nov 20, 2008, 2:02:38 AM11/20/08
to vim...@googlegroups.com

Yeah, the ":tab" prefix is exactly what I wanted.

Thanks John, and Tony for the extra clarification.

Pento

unread,
Nov 20, 2008, 7:15:43 AM11/20/08
to vim_use
Thanks a lot for this tip!
Reply all
Reply to author
Forward
0 new messages