Vim provides the function input() that can display a prompt for the user, then wait for the user to type some input. To avoid problems with Vim's typeahead mechanism (which includes the processing of mappings), you need to first call inputsave(), then call input(), then inputrestore(). Often it is better to write a Vim command, so you can simply type the desired command and arguments when wanted (you don't need to be prompted for input). However, it is sometimes useful for a script to prompt the user to enter a required parameter. confirm(text[,choices[,default[,type]]])
Attributes | Values |
---|
rdfs:label
| |
rdfs:comment
| - Vim provides the function input() that can display a prompt for the user, then wait for the user to type some input. To avoid problems with Vim's typeahead mechanism (which includes the processing of mappings), you need to first call inputsave(), then call input(), then inputrestore(). Often it is better to write a Vim command, so you can simply type the desired command and arguments when wanted (you don't need to be prompted for input). However, it is sometimes useful for a script to prompt the user to enter a required parameter. confirm(text[,choices[,default[,type]]])
|
Version
| |
dbkwik:vim/property/wikiPageUsesTemplate
| |
Previous
| |
Category
| |
Author
| |
Subpage
| |
Complexity
| |
Created
| |
ID
| |
NEXT
| |
abstract
| - Vim provides the function input() that can display a prompt for the user, then wait for the user to type some input. To avoid problems with Vim's typeahead mechanism (which includes the processing of mappings), you need to first call inputsave(), then call input(), then inputrestore(). Often it is better to write a Vim command, so you can simply type the desired command and arguments when wanted (you don't need to be prompted for input). However, it is sometimes useful for a script to prompt the user to enter a required parameter. If your are asking the user to confirm a choice, use instead the command confirm(text[,choices[,default[,type]]]) (Note: confirm() is only supported when compiled with dialog support). For more details see the help reference.
|