Suppose I want to write a report on what I see from my window : the bus departs, Mrs Smith goes to the grocer’s, etc…
An example : http://withhiddennoise.net/2010/08/12/georges-perec-an-attempt-at-exhausting-a-place-in-paris/
Of course, abbreviations are ideal for that type of shorthand. We could have :
:iabbr bd The bus departs
:iabbr sg Mrs Smith goes to the grocer's
But it is evident that these events will keep on repeating, and we are supposed not to re-use the same words (at least, not too often).
Is it possible then to have something which would look like this :
:iabbr bd RANDOM(The bus departs, The bus drives away, The bus takes off)
Thanks in advance
You could define a function like the following one
and then declare the following
imap:From now on, entering
bdin insert mode should insert one of the three random strings.Edit: As for the question if there can be multiple patterns: if I understood the question right, this is possible with something like: