How to view Vim help in its own tab
Sunday, January 23, 2011 at 12:37PM Vim has an amazing help system, and I use it all the time. You open Vim help with a command like:
:help ^]
(which will tell you what Ctrl-] does). Vim help windows have some special properties. First, there can be only one. If no help window is open, the :help command will open one. If one is open already, the :help command will reuse it. Second, if the help window is the only window left, Vim will exit.
That makes it hard to use the full screen for help, which I often prefer to do on my 11” MacBook Air. But there is a way: we can open the help window in its own tab page.
In Vim, the screen is divided into one or more windows. Each of these windows exists in a tab page (like a browser tab). A new tab page means a whole new set of windows. Or one really bit window. Possibly showing you the help file.
Let’s say you’re typing away, when you suddenly realize you’ve forgotten what Ctrl-] does.

So you ask for help:


See how you can still what you were working on at the bottom? Sometimes that’s useful, but sometimes you’d rather have those two lines for extra help window space. All we have to do is move the current (help) window to a new tab, which is Ctrl-W T. (NB: That’s a capital T, or Shift-T. Also, for context, Ctrl-W is the prefix for most everything you can do with a window.)

Look! A brand new tab with just the help file in it! To go back to what you were working on, you can use gT to go back a tab, and then gt to go forward to the help again.
There’s one other thing: if you want to open help in a new tab from the beginning, you can just type this:
:tab help {thing to ask about}
That’s the nifty :tab command: it can go in front of a command that opens a new window to make it open a new tab instead. (See :help :tab for more info.)

