Is there a list feature i am missing in text mate to list out out all the lines after doing a search and all the lines that have that search get opened in a separate text-mate file?
From: Brad Hutchins oshybrid@gmail.com Date: Thu, 1 Oct 2009 11:30:12 -0700
Is there a list feature i am missing in text mate to list out out all the lines after doing a search and all the lines that have that search get opened in a separate text-mate file?
Not that I know of, although are you aware of the Find-in-Project window? Obviously only works in a project (though it doesn't need to be a saved project file). And it doesn't output to text, but it does show all results in one window.
Also, I'm not familiar with the ack bundle, but it's possible that one of the search bundles offers something like that.
Dru
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. But once you have that compiled list of lines, you can pull out specifically what you want. In this case I was looking for 1800 IPs from a file and isolate the IPs only so I can have Angry IP do a ping sweep based on a list that it would be reading from (the isolated IPs).
On Thu, Oct 1, 2009 at 11:47 AM, Dru Kepple dru@summitprojects.com wrote:
From: Brad Hutchins oshybrid@gmail.com Date: Thu, 1 Oct 2009 11:30:12 -0700
Is there a list feature i am missing in text mate to list out out all the lines after doing a search and all the lines that have that search get
opened
in a separate text-mate file?
Not that I know of, although are you aware of the Find-in-Project window? Obviously only works in a project (though it doesn't need to be a saved project file). And it doesn't output to text, but it does show all results in one window.
Also, I'm not familiar with the ack bundle, but it's possible that one of the search bundles offers something like that.
Dru
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
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...
Ok found the combination that works for me. Have to do a bit more work then doing the same thing for "PSPad" on Windows but produces same results.
On Thu, Oct 1, 2009 at 11:16 PM, Hans-Jörg Bibiko bibiko@eva.mpg.de wrote:
... or have a look at Bundles > Text > Filtering
--Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate