How open help in the current window?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How open help in the current window?

Peng Yu
Hi,

When I open help by ":help", it will add a new window for help. Is
there a way to replace the current window with help? Thanks.

Regards,
Peng

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

Willy Gfn
Peng Yu wrote:
> Hi,
>
> When I open help by ":help", it will add a new window for help. Is
> there a way to replace the current window with help? Thanks.
>
> Regards,
> Peng
Hi !

I don't thinks it's possible, as the help window is a specific window.
Anyway, you can get the help window to fit the whole page by focusing it
and press <C-w>_

Regards,

Willy

> --
> You received this message from the "vim_use" 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_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

Yukihiro Nakadaira-2
In reply to this post by Peng Yu
On Fri, May 24, 2013 at 6:45 PM, Peng Yu <[hidden email]> wrote:
Hi,

When I open help by ":help", it will add a new window for help. Is
there a way to replace the current window with help? Thanks.

:set buftype=help
:help

--
Yukihiro Nakadaira - [hidden email]

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

Gary Johnson-4
In reply to this post by Peng Yu
On 2013-05-24, Peng Yu wrote:
> Hi,
>
> When I open help by ":help", it will add a new window for help. Is
> there a way to replace the current window with help? Thanks.

:help
:only

Regards,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

Tim Chase
On 2013-05-24 07:56, Gary Johnson wrote:
> > When I open help by ":help", it will add a new window for help. Is
> > there a way to replace the current window with help? Thanks.
>
> :help
> :only

This has unfortunate side-effects if you have multiple windows open.
Yukihiro's solution using ":set buftype=help" is the closest I've seen
to solving the OP's request (despite the warning in the help for
'buftype' that tells you it shouldn't need to be set manually) though
if the buffer has been modified, vim will warn you rather than losing
your changes.  There doesn't seem to be a ":help!" (well, there is,
but it doesn't abandon changes in the buftype=help window; rather it
attempts to console you in your panic :-)

-tim

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

Gary Johnson-4
On 2013-05-24, Tim Chase wrote:

> On 2013-05-24 07:56, Gary Johnson wrote:
> > > When I open help by ":help", it will add a new window for help. Is
> > > there a way to replace the current window with help? Thanks.
> >
> > :help
> > :only
>
> This has unfortunate side-effects if you have multiple windows open.
> Yukihiro's solution using ":set buftype=help" is the closest I've seen
> to solving the OP's request (despite the warning in the help for
> 'buftype' that tells you it shouldn't need to be set manually) though
> if the buffer has been modified, vim will warn you rather than losing
> your changes.  There doesn't seem to be a ":help!" (well, there is,
> but it doesn't abandon changes in the buftype=help window; rather it
> attempts to console you in your panic :-)

Good point.  I often use that when opening a new vim instance just
to read help.  I wasn't thinking about the multiple window case.

Regards,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

Tim Chase
On 2013-05-24 08:19, Gary Johnson wrote:

> On 2013-05-24, Tim Chase wrote:
>> On 2013-05-24 07:56, Gary Johnson wrote:
>>>> When I open help by ":help", it will add a new window for
>>>> help. Is there a way to replace the current window with help?
>>>
>>> :help
>>> :only
>>
>> This has unfortunate side-effects if you have multiple windows
>> open.
>
> Good point.  I often use that when opening a new vim instance just
> to read help.  I wasn't thinking about the multiple window case.

And my intent was not to discredit your answer either, since I
too do :help/:only far more than I've ever twiddled the 'buftype'.
It just does something different than what the OP asked.  :-)

-tim


--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: How open help in the current window?

glts
In reply to this post by Peng Yu
Peng,

On Friday, May 24, 2013 11:45:21 AM UTC+2, Peng Yu wrote:
> When I open help by ":help", it will add a new window for help. Is
> there a way to replace the current window with help? Thanks.

I have this mapping in my vimrc:

    " Open help in a separate tab with <F1>
    noremap <F1> :<C-U>tab help<CR>

This way I can just hit <F1> for full-screen help.

David

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.