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

Why are the docs in the main vim file? #5

Open
NewAlexandria opened this issue Mar 3, 2014 · 1 comment
Open

Why are the docs in the main vim file? #5

NewAlexandria opened this issue Mar 3, 2014 · 1 comment

Comments

@NewAlexandria
Copy link

Pardon, I haven't written a plugin and don't know if there are strange support cases. Is there a reason to put help info in the main plugin code as a function?

  • Is this to re-write the names of the keys that are mapped to textabyss variables?
  • Could this be solved by using more descriptive variable names and then just use them as 'the API' described by the docs?
@q335r49
Copy link
Owner

q335r49 commented Mar 3, 2014

I think you are referring to printHelp() and why I don't use vim's built-in help pager?

That's actually not a bad idea. The pros are that I can provide a sort of more contextual help, I guess. Like, pressing F1 in the map will just print the map help.

Another issue is that horizontal splits actually will mess up the panning. I had no idea how fast or slow panning would be when I wrote this, so I didn't build in any error checking for horzontal splits. I figured I was using a scripting language and that the panning would have to occur in real time, with the mouse, and so I left out any checks for horizontal splits. (For example, I assume that winnr('$') is the total number of vertical splits (and not total splits in general) in the file.

So, unfortunately, having a help split open across the top of the tab will mess up panning below it. It wouldn't be a bad idea to add in a once-off check for horizontal splits, in the future, like when teh mouse first starts dragging, to deal with this situation.

Thanks!

Leon

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