I do this for opening help pages in vertical window:
cabbrev help vert botright help
this way, it is ok, but a bit disturbing, and it is spamming my :history a bit too.
I would like to get Vim to not expand this, just run the command. So when I write :help topic I want it to not expanded, but to run the command :vert botright help topic
I tried with
cabbrev <silent> help vert botright help
but it doesn’t work.
Is it possible to do at all?
I found the perfect solution based on this e-mail:
http://vim.1045645.n5.nabble.com/Horizontal-layout-by-default-td1164876.html#a1164886
So if you want help windows on the right, do this:
this puts the
'help'type windows immediately to the right just likeCTRL-W H. See:h CTRL-W_Hin vim.The small problem with it if you have the
hiddenoption enabled, just closing the window with:qdoesn’t unload the help window buffer, and if you want to open it again, it will not trigger the FileType event for some reason (why?), so if you use:set hiddenyou need to:to get help windows unload, which is the default behavior anyway.