duydao / Text-Pastry

Extend the power of multiple selections in Sublime Text. Modify selections, insert numeric sequences, incremental numbers, generate uuids, date ranges, insert continuously from a word list and more.
MIT License
832 stars 46 forks source link

Repeating increments not working with letters #38

Closed mkruselj closed 8 years ago

mkruselj commented 9 years ago

I wanted Text-Pastry to do this:

A A A B B B C C C

I've tried to use "letters 1-3 each=3", but it didn't work. :(

It'd be great if repeating increments would work for not just letters, but anything else, simply by adding the "each" keyword. Of course, if I'm missing something here and this is already possible, I'd love to be corrected (but then also wiki should have examples of this, too :))

Thanks!

okitu commented 8 years ago

+1

I just wanted to increment something with hex-values. Please add custom ranges! numeric, alpha-numeric, hex, ...

duydao commented 8 years ago

Hey, thanks for usong Text Pastry!

We can use the x-arg to repeat a loop, but not all commands support it yet.

As for custom ranges: we can use custom lists or a word list for this (let me check the Wiki). Do you have a specific example for this use-case?

duydao commented 8 years ago

Repeating words is supported in 1.5.0. This can be done by the x-arg (e.g. x2) or each=2:

letters 1-3 each=3

will produce the same result as:

words a b c x3