The Vim help actually includes a recipe to define a new command :HelpCurwin to open help in the current window, you can find it under :help curwin.
To define the new command, include this snippet in your vimrc (or a *.vim file under directory ~/.vim/plugin would also work):
command -bar -nargs=? -complete=help HelpCurwin execute s:HelpCurwin(<q-args>)
let s:did_open_help = v:false
function s:HelpCurwin(subject) abort
let mods = 'silent noautocmd keepalt'
if !s:did_open_help
execute mods . ' help'
execute mods . ' helpclose'
let s:did_open_help = v:true
endif
if !getcompletion(a:subject, 'help')->empty()
execute mods . ' edit ' . &helpfile
endif
return 'help ' . a:subject
endfunction
After you have that set up, you can open help in the current window with:
:HelpCurwin
Or, to get help for a particular topic (for example, the :helpgrep command):
:HelpCurwin :helpgrep
Tab completion will work for the command itself (so :H<Tab> might complete it if you don't have any other user-commands starting with H) and for help topics as well.
:tab help. – D. Ben Knoble Dec 20 '21 at 15:07<c-w>T/:windcmd Tto move the current window to a new tab. Perhaps you can usewinrn('$')to get the window count to accomplish your window-to-tab move – Peter Rincker Dec 21 '21 at 16:11