[TxMt] Re: lines listed

Paul McCann pmccann at gmail.com
Thu Oct 1 23:36:18 UTC 2009


Hi Brad,

> Close . . . but you can't do anything with that data.  It allows you to
> select it all, but you can't copy it to a separate file.  But very close.
>  PSPad (windows only) has a list function that works just like the list in
> project.  But then you can have that Listed data go to a separate file and
> then extract specific data out of that.  The List function gives you the
> whole line, not just what you are looking for via regular expression.

You probably want to use the "Filter through command"
(command-option-R) to get a new document produced: for something like
hunting out the lines containing IP numbers use a simple

  perl -ne 'print if /\d+\.\d+\.\d+\.\d+/'

as the command, with "whole document" as source and "new document" as
output will do the job(*). It's infinitely flexible if you're happy
with regex and (some) underlying scripting language, and hence
somewhat more in keeping with TextMate's guiding philosophy than a
specific built-in function would be.

Cheers,
Paul

(*) Yeah, I realise that's not a perfect fit to IP numbers, but it is
usually good enough...



More information about the textmate mailing list