Re: [vim/vim] Force help to open in current window. (#7534)

2020-12-29 Fir de Conversatie Charles Campbell

Pavol Juhas wrote:
I think this can work without opening/closing help, the trick is to 
set buftype=help.

Also :view is preferable so that the main help file opens as read-only.

$ vim
:view `=`
:setlocal buftype=help
:help grail


As a command, and using a modified method:

  com! -nargs=+ HE set bt=help|help 

then :HE topic will give one help on the requested topic in the current 
window.


Regards,
Chip Campbell

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a9191d8f-af9f-35f0-4eb7-d78ab257e29b%40drchip.org.


Re: [vim/vim] Force help to open in current window. (#7534)

2020-12-26 Fir de Conversatie tooth pik
why not do something simple like

command! -nargs=+ H execute "silent help " | only

in your vimrc?

On Sat, Dec 26, 2020 at 10:22 AM lacygoill 
wrote:

> For me, it doesn't seem to work; that is, I still get two windows instead
> of one, because :h still splits the current window, even when the latter
> displays a help file. Maybe I'm missing some option though.
>
> Is there a way to automate that?
>
> Try this:
>
> au CmdlineLeave : if getcmdline() =~# '^h\%[elp]\s' | exe 'e ' ..  | 
> endif
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> , or
> unsubscribe
> 
> .
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/7534/751371195%40github.com
> 
> .
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CALfSX1zo1FE%2BidnT7OJCS0%2BGm8ZxRG9szLj0tzDR1PK9kGoJmw%40mail.gmail.com.