[TxMt] Re: quick way to find longest line in file?
Hans-Jörg Bibiko
bibiko at shh.mpg.de
Fri Jan 29 00:14:09 UTC 2016
Hi Bill,
it's fast written ;) - and if you don't have more than 999999999 lines in your document:
Create a new Command; input: selection or text; output: discard
Command:
#!/bin/sh
open txmt://open?line=`nl -nrz -w9 -b a|awk '{print length, $0}'|sort -nr|head -1|awk '{print $2}'`
This command will locate the caret at the beginning of the longest line in the current document.
Cheers, Hans
More information about the textmate
mailing list