Closed blindFS closed 9 years ago
I'm afraid this is not possible as the input()
prompt is not in command mode, but its own special submode. I may be wrong here, feel free to correct.
Cmd2 does not have access to this submode.
One possible fix is to create a Cmd2 mode which is activated when an input()
function is called in command mode, but this is complicated.
If there is a specific situation you wish to call this in then it should be much simpler, i.e. when this function is called from a mapping, you can instead remap the mapping to the new Cmd2 mode. With more context of the problem I may be able to come up with an alternative solution.
Is is possible to distinguish c-mode and this submode using tests? Or I may want to add a mapping to just 1 of these modes, but cmap
would affect both.
You can create the new Cmd2 submode such that it does not accept cmap
s, or has its own special maps.
OK, I'll take a look at it.
The creation of submodes is not documented yet as I expect to be changing how it works, but if u briefly explain the problem I can come up with a quick skeleton solution.
For example,
:echo input(":")
will ask for input in command mode. This plugins doesn't seem to work in such situations. I have mapped<C-R>
using your method: https://github.com/junegunn/vim-peekaboo/issues/23#issuecomment-84500667 , and I'd like to have this feature for inputs also.