Automatically generating text with Vim, using patterns like incrementing numbers, etc.
Vim supports automatically generating text following a pattern, via macros, motions and functions. For example, the following generates a sequence of numbers from 1 to 10:
i1<esc>qqYp<c-a>q8@q
Breaking down:
i1<esc>write1and back to normal modeqqstart recording a macro in the registerqYpyank the line and paste it below<c-a>increment itqstop recording the macro8@qrepeat the macro in the registerq8 times.
Other facilities for automation include using functions in the replacement of a :substitute command, looping over text, etc.