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

In Vim 7.4: paste option not working showing function errors. #81

Closed
hemanta212 opened this issue Jul 21, 2018 · 5 comments
Closed

In Vim 7.4: paste option not working showing function errors. #81

hemanta212 opened this issue Jul 21, 2018 · 5 comments
Labels

Comments

@hemanta212
Copy link

I am using cht.sh in vim. I can easily search for queries and it displays in pager but when I try to paste the answer vim throws error. ( I have tried all 3 paste methods (Kp, KP and KC) nothing works

Error detected while processing function cheat#navigate:
line 58:
Zero count: d0
Sending query : "python/lxml+install+error" to https://cht.sh this may take some time
Error detected while processing function cheat#navigate..108_handleRequest:
line 31:
E117: Unknown function: job_start
E15: Invalid expression: job_start(curl, {"callback": "cheat#handleRequestOutput", "close_cb": "cheat#printAnswer"})
Press ENTER or type command to continue

@chubin
Copy link
Owner

chubin commented Jul 21, 2018

Thank you very much for reporting!

I suppose that the problem here is that your vim is too old (I think you have vim 7 and not vim 8), and does not support asynchronous jobs and the job_start function.
It is, of course, a bug anyway, and it will be fixed.

Please, could you provide some information about your Vim?
vim --version would be great.

Development of the Vim plugin is happening here:
https://gitlab.com/dbeniamine/cheat.sh-vim
@dbeniamine is the principal developer of the plugin.

I will open an issue there, so if you have a gitlab account, you can follow it,
and if not just follow this issue here, I will post the updates here too.

@chubin chubin added the bug label Jul 21, 2018
@chubin chubin assigned chubin and unassigned chubin Jul 21, 2018
@hemanta212
Copy link
Author

hemanta212 commented Jul 21, 2018 via email

@chubin
Copy link
Owner

chubin commented Jul 21, 2018

Ok, thank you very much!
A quickfix (but maybe it is not an option for you)
would be just update your vim.

@chubin chubin changed the title Paste option not working in vim showing function errors. In Vim 7.4: paste option not working showing function errors. Jul 21, 2018
@chubin
Copy link
Owner

chubin commented Jul 23, 2018

Update from @dbeniamine:

I found one issue, maybe there is two :

    E117: Unknown function: job_start Cheat.sh was trying to use job_start while your vim does not have jobs, fixed by 6af6717e
    line 58: Zero count: d0 This means that cheat.sh tryed to remove lines that were not there, I think this issue might disappear with the previous fix

Can you update the commit (the fix is also on github) and tell me if 2. is also fixed ?

@hemanta212:

Could you please update your plugin (or reinstall it)
from GitHub, and try whether the fixes from @dbeniamine have solved the problem?

@hemanta212
Copy link
Author

Ok, this finally fixed my pasting problem. Thanks :) a lot.

@chubin chubin closed this as completed Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants