On 01/09/09 12:35, Spencer Collyer wrote:
>
> In the help for the 'help' command it states the following:
>
> -----8<--------8<--------------------8<--------8<--------------------8<-------
> :h[elp] Open a window and display the help file in read-only
> mode. If there is a help window open already, use
> that one. Otherwise, if the current window uses the
> full width of the screen or is at least 80 characters
> wide, the help window will appear just above the
> current window. Otherwise the new window is put at
> the very top.
> -----8<--------8<--------------------8<--------8<--------------------8<-------
>
> However, I have the 'splitbelow' option set and my help windows always
> open below the current window. This is consistent with the help for
> 'splitbelow' but not for the help for 'help'. Is this a bug in the help
> or the behaviour of 'help' when splitbelow is set?
>
> What I'd really like is for the help window to _always_ appear above
> the current window (as stated in the above help text), ignoring the
> value of 'splitbelow'. Is there any easy way I can do that?
>
> Spencer
>
I think that the fact that the help window obeys the 'splitbelow'
setting is the desired behaviour, and that the text under ":help :help"
(and maybe at some other places) has not been updated due to an
oversight at the time the 'splitbelow' option was introduced.
I use the following to open the help window at the very bottom when I
use F1, ":h" or ":h {subject}" (typing ":help" in full would revert to
default behaviour); you could use the :abo[veleft] prefix instead of
:bo[tright] to open just above the current window instead. Only if there
is no help window yet, of course: an existing help window in the current
tab page will always be reused, as mentioned in the help text you quoted.
" open help window at bottom unless :help typed in full
if version < 700
cnoreabbrev h bot h
else
cnoreabbrev <expr> h
\ ((getcmdtype() == ':' && getcmdpos() <= 2)? 'bot h' : 'h')
endif
map <F1> :bot help<CR>
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---