Let's say we wanted to produce the following text in a very "vim" way:
Row 1 {
33.33%;
}
Row 2 {
66.66%;
}
Row 3 {
100%;
}
This isn't too complicated, but I think of it as a standin for something far more annoying, like having 12 rows (which might happen in CSS, for instance). I'm not interested in writing a whole plugin, because I think that is excessive.
Something I don't know too much about yet is using expressions () or making throw-away mappings. I bet these would lead to really clever, really nice ways.
It might be that the "right" way is to be clever with a macro involving :put =1.0/3
or something (this performs the division). But I'm not sure how to properly increment the numerator in this sort of expression.
It might be the "right" way to open a scratch buffer, write a quick throwaway function, and call it. But really, this is a very large hammer for a very small nail. There is some length of list where this would become more efficient than simply typing it, though.
There might be :ex
magic or a really convenient commandline tool that I should pipe into vim, too.
There are so many options, and I'm not sure which are reasonable, and which are in the vim way.
To make this clear, I am not looking for the shortest way as in true code-golf, but instead a way that is extensible and comparable to making other formatted lists of numbers