How do I open Vim help pages in a new tab instead of a split?
Answer
:tab help
Explanation
By default, :help opens in a horizontal split, which can feel cramped. The :tab modifier tells Vim to open the resulting window in a new tab page instead. This gives you a full-screen help page that you can read comfortably alongside your work.
How it works
:tab help topic— open help fortopicin a new tab:tab help— open the main help page in a new tab
The :tab modifier works with many commands that create splits, not just :help.
Example
:tab help pattern
This opens the help page for search patterns in a full-width tab. Use gt and gT to switch between your code and the help tab.
:tab split
This opens the current buffer in a new tab — a quick way to get a full-screen view of a file that is currently in a split.
Tips
- Add
autocmd BufEnter *.txt if &buftype == 'help' | wincmd T | endifto your vimrc to automatically move all help buffers to their own tab :tab drop filenameopens a file in an existing tab if already open, or a new tab otherwise- Close the help tab with
:tabcloseor:qas usual