I know I can browse Vim help with
:help, but this opens a split. Sometimes, I just like to study documentation. How read documentation in a "full screen" mode?
The other answers have already answered your question, but for the sake of completeness:
If you just want to temporarily get a larger window for your help-viewing, you can use either or both of the
Ctrl-w _ and
Ctrl-w | mappings to maximise the help window as much as possible vertically or horizontally, respectively, but without closing your existing split windows.
When you subsequently close the help window with
Ctrl-w c or
:q, your window layout will be returned to exactly how it was before you opened the help window.
This is useful if you have a slightly more complicated window layout which you would like to preserve.
I often open a new vim instance in another workspace/screen just to pop open a help window so this article was enormously helpful to me.
Here Is a bit of VimScript that I just wrote that will open a
help page in a new tab, and automatically close a new/empty buffer if necessary. Hopefully it is useful to folks in the future. Thank y'all for your help!
" Help: Open a `help` page in a new tab, or replace the current buffer if it " is unnamed and empty. function! Help( query ) " Is the current buffer empty? let l:empty = line( '$' ) ==# 1 && getline( 1 ) ==# '' " Store the current tab number so we can close it later if need be. let l:tabnr = tabpagenr() let l:bufname = bufname( winbufnr( 0 ) ) try " Open the help page in a new tab. (or bail if it's not found) execute "tab help " . a:query " The help page opened successfully. Close the original tab if it's empty. if l:bufname ==# '' && l:empty execute "tabclose " . l:tabnr endif endtry endfunction command! -nargs=1 Help call Help( <f-args> )
I wrote a tiny plugin to do this a few years ago: vim-helptab. It opens help docs in their own tab when you type
:h .... To bypass it you can do
:he ... or