0

How I can write something to vim command line and then read some input from it to plugin? For example, I want to write choose "Choose search patter (1, 2, ... 0):". Then user presses "2", the plugin read receive it and do something. How make such interaction in vim plugin?

1 Answer 1

4

in your function:

call inputsave()
let p = input('Choose search patter (1, 2, ... 0):')
call inputrestore()
echom p "here you got userinput

for detail:

:h input()
:h inputsave()

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .