I often use the inputdialog to execute a command using:
let n = confirm({msg} [, {choices} [, {default} [, {type}]]])
p.e. search numbers
if n == 1 –> p.e. do search of all numbers with ‘.,’
if n == 2 –> p.e. do search of all exponential numbers
if n == 3 –> p.e. do search of all numbers with 3 digits
etc
but with this method I can only choose one argument.
Is there a way in Vim where you can chose multiple arguments together in an inputdialog?
A workaround, use
input()function, let the user to choose multiple options and split them into a list to process them. An example:Add next function to
vimrcor similar file:Call it:
There will appear your options:
Select them like:
And the function will split them into a list.