[TxMt] Re: How do I insert a sequence of numbers to a rectangular selection?

Paul McCann paul.mccann at adelaide.edu.au
Tue Apr 23 15:38:21 UTC 2013


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 at 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 at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20130424/4c106ebd/attachment.html>


More information about the textmate mailing list