def python_input(message = 'input'):
vim.command("call inputsave()")
vim.command("let user_input = input('" + message + " : ')")
vim.command("call inputrestore()")
return vim.eval('user_input')
now everytime you wanna prompt user, in your python script do something like
input = python_input('input something')
it will prompt the user to input something with 'input something' as the caption of the prompt, in the command-line
for more detail
:help input()
hope, this would help.
No comments:
Post a Comment