Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a setting so docs open in dedicated buffer by default #49

Closed
ForgottenUmbrella opened this issue Jun 11, 2017 · 2 comments
Closed

Comments

@ForgottenUmbrella
Copy link

Although I could just use the bang variations of the commands, e.g. :h! foo to open documentation in an already existing help window, I think users are used to :h foo opening in a dedicated buffer by default. That is, instead of opening in another "DocN" buffer, there would only be one "Doc" buffer.

I request that a setting be provided that makes the commands open in a dedicated buffer as expected. Yes, I could just get used to :h! foo, but that's one more keystroke than usual.

@powerman
Copy link
Owner

When you wanna modify keystroke to type in vim you can add something like this in your .vimrc:

cnoreabbrev <expr> h getcmdtype()==':' && getcmdline()=='h' ? 'ViewDocHelp!' : 'h'

ViewDoc already have two sets of hotkeys (K and F1) and two sets of command (with/without !) to choose between single "Doc" and multiple "DocN" buffers. Adding a setting which will switch meaning of these will add a lot of confusion. For example, I'll have to require people mention value of this settings in issue reports. So, I don't like this idea for now. If you can solve your issue in your vimrc then it's probably best way to go.

@ForgottenUmbrella
Copy link
Author

I understand. I believe this abbreviation will do the trick, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants