Opening Vim help in a vertical split window
:vertical
(vert
) works:
:vert help
You can also control whether the window splits on the left/top or the right/bottom with topleft
(to
) and botright
(bo
). For example, to open help in the right window of a vertical split:
:vert bo help
No need to remap any commands or introduce weird aliases like :Help
. Here is the solution. Create ~/.vim/after/ftplugin/help.vim
where you can override any Vim settings particularly for help
and add the following line there:
autocmd BufWinEnter <buffer> wincmd L
This hook will ensure that any help
file is opened in vertical split. Furthermore, it does not have a side effect described in Sean's answer. Personally, this is perfect solution for me so far.
Hope this helps. Best of luck.
As an alternative to Haroogan and Sean's answers you can use the FileType
event for the autocommand like this:
autocmd FileType help wincmd L
Although this will change the position of any help window as well as moving the window after manually placing it if the file you are looking at changes. But I believe that this is a problem with any solution.