For example, I have the following text:
one two three
I can option-click and then drag across the beginning the these lines to insert the same characters to all three lines, e.g. a dash
-one -two -three
Is it possible to insert a sequence of numbers? Like:
1 one 2 two 3 three
If this is possible, how about multi-digits? Like:
1 one 2 two ... ... 10 ten 11 eleven
Note that there is a space in front of 1 and 2 in the first two lines.
Are these possible? Thanks!
Hi, if the task only is to insert numbers from 1 to x then you can play maybe with the function "Bundles > Text > Add Line Numbers to Selection" which simply applies the Bash commands "cat -n|expand -8" to the selection or the entire document.
Cheers,
Hans
More generally, if you're happy playing around a little, and know something about a scripting language, then "Text => Filter through command..." has a heap of power. For example, entering
perl -pe 's/^/sprintf("%2d ",$.)/e'
does what you're seeking.
Cheers, Paul
On Tue, Apr 23, 2013 at 9:54 PM, Hans-Jörg Bibiko bibiko@eva.mpg.de wrote:
Hi, if the task only is to insert numbers from 1 to x then you can play maybe with the function "Bundles > Text > Add Line Numbers to Selection" which simply applies the Bash commands "cat -n|expand -8" to the selection or the entire document.
Cheers,
Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
In addition to the commands mentioned by Hans and Paul, there is also the shell command "nl".
-John
Thanks for all the suggestions!
-- View this message in context: http://textmate.1073791.n5.nabble.com/How-do-I-insert-a-sequence-of-numbers-... Sent from the textmate users mailing list archive at Nabble.com.