[TxMt] Re: insert a column of numbers

Kai Brust kai.brust at gmail.com
Tue Oct 8 11:49:56 UTC 2013



On 08.10.2013, at 13:47, Kai Brust <kai.brust at gmail.com> wrote:

> On 08.10.2013, at 12:53, Ross Ahmed <rossahmed at googlemail.com> wrote:
> 
>> Thanks that works fairly well thanks. 
>> 
>> I think the number of keystrokes could be reduced however, by for example making a column selection then inserting numbers. Or is this asking too much?!  
> 
> Allan answered the part about column selection already. Meanwhile, until this stuff is implemented, you could filter your lines through the following command and number them in one go:
> 
> nl | awk '{ print $2$1 " " $3 " " substr($4, 0, length($4)-1) $1 "\"" }’
> 
> (Assuming the quoted words in your example are never containing any additional spaces)

Sorry, last char should have been a single quote:

nl | awk '{ print $2$1 " " $3 " " substr($4, 0, length($4)-1) $1 "\"" }'


More information about the textmate mailing list