Timeline for How to wait for user input in the middle of a mapping?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 2, 2016 at 20:06 | comment | added | saginaw |
@EvergreenTree Thank you, I didn't know this service, I will use it for the syntax highlighting. Yes, the problem seems to come from the input() function because when you call it from a mapping it consumes the remaining characters from it. At the very end of :help input() , they give an example of how to solve the issue, but it involves defining a function and calling inputsave() and inputrestore() which makes the code much longer. I prefer your code as it takes only one line and is simpler to maintain.
|
|
Jan 2, 2016 at 19:50 | comment | added | EvergreenTree | @saginaw I figured it would be possible, but not the way I was doing it. Also, you can use vpaste.net for vimscript syntax highlighting. | |
Jan 2, 2016 at 19:34 | comment | added | saginaw | @JasonBasanese I don't know if there's another way of doing it, but you could try this: paste.debian.net/plain/359252 | |
Jan 2, 2016 at 19:04 | comment | added | EvergreenTree | @JasonBasanese As far as I know, no. (at least using this method) | |
Jan 2, 2016 at 18:45 | comment | added | Jason Basanese | Is there a way I could make it type out the "Hello, " before I have answered the input prompt? | |
Jan 2, 2016 at 17:02 | vote | accept | Jason Basanese | ||
Jan 2, 2016 at 16:53 | history | answered | EvergreenTree | CC BY-SA 3.0 |