Hi Visconti,

To get something equivalent to "all /blabla":
In latest Textmate build, cmd-| ("|" is unix pipe character, not lowercase l or uppercase i) triggers "Filter through command". First select all text you want to search inside. Then press cmd-| You can then type "grep 'blabla'" as command. You can select how output will be handled. 

Grep can do way more of course. For example, "grep 'foo\|bar'" will output lines containing either foo or bar. You can also exclude words. See http://stackoverflow.com/questions/4538253/grep-how-could-i-exclude-one-word for how.

I don't think there's a way to exclude/include lines interactively, but you can get pretty far by just editing the grep command, and rerunning it either on current result, or on the original text.

Allan, there seems to be a bug (or is it a feature?) where if command output is null, the selected text is not replaced.

Meryn


On Mon, Mar 25, 2013 at 10:05 PM, Visconti <visconticc@yahoo.com> wrote:
Hello all,

I am new to Textmate and looking for a way to filter lines as I did with the
old editor "kedit". It had commands like "all /blabla" to display only lines
containing "blabla", "more /yesyes" to add the lines containing "yesyes" to
the current line view, and "less /blabla" to hide again the lines containing
"blabla" from the current view.

I will be happy to get just the "all /blabla" functionality in Textmate,
i.e. I'd like to filter out all lines containing (for example)
"<onetwothree>" and either hide all the others or export all the
"<onetwothree>" lines to another file.

Is there a way to achieve that???

Thanks

Visconti




--
View this message in context: http://textmate.1073791.n5.nabble.com/Filtering-out-specific-lines-tp26423.html
Sent from the textmate users mailing list archive at Nabble.com.

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate