-
Notifications
You must be signed in to change notification settings - Fork 4
accept stdin requests and add method to reply to them #4
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
Conversation
…of the vim-ipython buffer
|
I like it, but can you think of a way to respond to input requests using the command prompt only without having to open vim-ipython up in the preview window? |
|
Thanks! What about adding a command for answering prompts? I could also add a mapping to call this command. for input maybe? I'm not sure whether or not to add parameters to this :IPythonInput command and send the those directly to the kernel. That should be fine most of the time but people should be careful when typing passwords that way |
|
For some reason I'm getting I'd prefer having As for having a mapping, I think we already have quite a mess of mappings and it's not hard to just map I'm also unsure about accepting the input itself as part of the command. It sort of makes sense for a regular input request but we definitely don't want passwords stored in command history. To keep the regular and secret as similar to each other as possible, the command should just bring up the |
|
I have made some changes to the code and created two commands;
By calling either of these commands with a bang, e.g. |
|
By the way, what are you doing exactly to get that error? I can't find the reason for it... |
|
I was running in neovim and the error message was sort of misleading. I now ran it in vim8 and got the error |
…er. Use :IPythonInput instead
|
To be honest, I found it easy to do so and it felt almost like working with a shell. It's not really needed and it's actually a bit different to other vim plugins so I just removed the insert mode parts. If anyone wants to do this, he can just get my previous commit and do something similar with autocommands in |
|
Thanks. 👍 |
This pull request is for adding the option to reply to stdin requests from the kernel.
With this, it's possible to prompt for users, passwords or even use ipdb to debug a program.
Everytime the kernel asks for input, it will inform of that in the status line and it's possible to answer by going to the vim-ipython buffer and editing the last line, which will show the prompt text. I'm using vim input or inputsecret functions to ask for user input as I think that's more appropiate than just writing text in the buffer