Clear input prompt after input is entered?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Clear input prompt after input is entered?

Ben Klein
When I accept user input in a function using input() and don't output any new messages for the rest of the function, the input prompt and the input remain as the last message. Is there any way to clear the prompt line once input has been received?

Thanks!

--
b

smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Clear input prompt after input is entered?

Nikolay Aleksandrovich Pavlov


On Oct 9, 2013 7:25 PM, "Benjamin Klein" <[hidden email]> wrote:
>
> When I accept user input in a function using input() and don't output any new messages for the rest of the function, the input prompt and the input remain as the last message. Is there any way to clear the prompt line once input has been received?

Try using :redraw or :redraw!.

> Thanks!
>
> --
> b

--
--
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: Clear input prompt after input is entered?

Ben Klein
On Oct 9, 2013, at 10:28 AM, Nikolay Pavlov <[hidden email]> wrote:

Try using :redraw or :redraw!.

That did it. Thanks!

--
b

smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Clear input prompt after input is entered?

Wiere Neuer
In reply to this post by Ben Klein
Is there a way the is not so "invasive"? Redrawing the whole screen, clearing it first, seems to be a little bit much of overhead for just resetting the command line...

--
--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Clear input prompt after input is entered?

Wiere Neuer
In reply to this post by Ben Klein
I found this a (one possible) solution:

let in = input("...")
normal :<ESC>

--
--
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/d/optout.