I want to create a function which would have the same behavior as for example
:tabs (the screenshot is in french but I'm sure most of you will see what I mean):
I for now I have the folowing command which works partially:
function! MyFunction() echo "foo" echo "bar" let test = input("Press Enter or input a command", "", "command") endfunction
The output is shown until the user input something but the behavior is not exactly the same as the one of the built-in functions:
With my function the line
Press Enter or input a commandwill stay on screen whereas with the built-in functions when the user press a key the blue sentence on my screenshot disappears to let the command prompt appearing.
Also I'll have to create my own code to execute the command entered by the user if he enter one.
So my question is: Is there a "default" way to keep the ouput of my vimscript function in the command line windows on the bottom of the screen until the user press Enter or input a new command?
I would be surprised if every function with an output had to redefine this behavior but I couldn't find how it is done.