Grep functionality in TC?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
thomask
Junior Member
Junior Member
Posts: 4
Joined: 2005-06-23, 06:55 UTC

Grep functionality in TC?

Post by *thomask »

Hi - does anyone know of a way to get TC to have "grep"-like functionality in its search function (Alt+F7).

Instead of just displaying the files having a specific search text, I would like a line or two for each occurrence in each file.

I have tried to search for a tool that does this and they exist - but they also cost money, and I am not really prepared to pay 50$ for this - not yet anyway. :-)

Cheers
Thomas
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Try BareGrep (or BareView), it's a visual grep utility:
http://www.baremetalsoft.com/baregrep/index.php

Free BareGrep has a five second nag screen when starting, otherwise it's not limited. BareView ends itself after five minutes but combines grep and tail functionality, a really great piece of software.

Such a feature would be nice in TC of course but it's not very realistic to expect it in the near future I think.

Icfu
This account is for sale
thomask
Junior Member
Junior Member
Posts: 4
Joined: 2005-06-23, 06:55 UTC

Post by *thomask »

I already tried BareGrep :-) and you are right - it is nice. Just think its too expensive.

> Such a feature would be nice in TC of course but it's not very realistic to expect it in the near future I think.

Ok - too bad.

Cheers

Thomas
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I already tried BareGrep and you are right - it is nice. Just think its too expensive.
You don't have to buy it, it's ok to use it with the nag screen as long as you wish.

I have prepared a button I regularly use. Just mark all files you wanna search and press it:

Code: Select all

command: lst2str.exe
parameter: /X:"baregrep.exe" /L:"%L" /S:"Keyword"
lst2str you get here:
https://plugins.ghisler.com/addons/lst2str.zip

Icfu
This account is for sale
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

2Icfu

That's a nice tool with a nice integration with TC thanks to your settings.
Thanks for sharing!

Do you know if there is a way to open the matched results in a text editor.
I ideally would like to choose one matched entry of the 'listbox' and retrieve the file in a texteditor and that it goes directly to the specified line.

I have the feeling it is not possible, am I right ?
Last edited by gbo on 2005-06-23, 10:01 UTC, edited 1 time in total.
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I ideally would like to choose one matched entry of the 'listbox' and retrieve the file in a texteditor and that it goes directly to the specified line.
Have you tried BareView? It has an integrated file viewer that does exactly that, no idea if editing functionality is planned for the future, don't hesitate to request that.

Jumping to a line in an external editor is not possible, this would need an interface between editor and BareView.

What you can do is export all matched lines including the corresponding filenames to a file and use that one as a starting point for jumping to the lines by Ctrl-F or you can copy & paste from the result view.

Icfu
This account is for sale
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

Thanks for the reply
icfu wrote: Have you tried BareView? It has an integrated file viewer that does exactly that, no idea if editing functionality is planned for the future, don't hesitate to request that.
Nice tool too but in my case I would prefer the duo baregrep.exe (because of the restriction of bareview - ends itself after five minutes) + textpad.exe. So I will request editing functionality in baregrep.exe and I will report here if successful.
icfu wrote: Jumping to a line in an external editor is not possible, this would need an interface between editor and BareView.
What you can do is export all matched lines including the corresponding filenames to a file and use that one as a starting point for jumping to the lines by Ctrl-F or you can copy & paste from the result view.
Hopefully with the hypothetical editing functionality (eg preferences -> Use other program to open match result) it will be possible because with textpad you can use parameter that allow to jump to a specific line

eg : TEXTPAD.EXE -am "N:\PATH\fckplugin.js"(80,85)
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6981
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Use PSPad Editor

Post by *Horst.Epp »

The free editor PSPad has a search in files function which show the results in list you can expand and shrink per file, open the relevenat files and more.
Just try it.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

PSPad has no RegEx search when searching thru multiple files, searching in all currently open files doesn't work (no idea why, all I get is a *plonk* sound, any idea?), speed is rather slow, on complicated or too simple searches with lots of matches the whole process doesn't respond anymore and it doesn't work in real time but each search has to be manually started.

Anyway, PSPad looks pretty impressive as an editor meanwhile though it still lacks the UltraEdit column mode unfortunately.

Icfu
This account is for sale
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6981
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

icfu wrote:PSPad has no RegEx search when searching thru multiple files, searching in all currently open files doesn't work (no idea why, all I get is a *plonk* sound, any idea?), speed is rather slow, on complicated or too simple searches with lots of matches the whole process doesn't respond anymore and it doesn't work in real time but each search has to be manually started.

Anyway, PSPad looks pretty impressive as an editor meanwhile though it still lacks the UltraEdit column mode unfortunately.

Icfu
Search in open files works for me (PSPad version 4.3.3 (2085)
There is a column mode. Try the Alt key while selecting.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Search in open files works for me
I mean the "search and replace in files" function, it works only when I choose the folder containing the files, not with the already opened ones. In case you mean that, too, it's very strange, can't get it to work. I am using the most recent version, downloaded today.
There is a column mode. Try the Alt key while selecting.
Not comparable to the mode in UltraEdit, there you have a column mode with replace/fill option. For example you can mark 1000 lines spanning 10 columns, press delete, enter 1234567890 and all 1000 lines will be filled with 1234567890. If you don't press delete the whole box is replaced with the character you enter.

Icfu
This account is for sale
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

gbo wrote: So I will request editing functionality in baregrep.exe and I will report here if successful.
For information here is their kind answer to my request

REQUEST :
Would it be possible to add an editing functionality that will allow to double click the desired matched line (alternatively to highlight the desired matched line and press CTRL+F shortcut to be define) Afterthat the desired file would be retrieved in external editor.

Editing functionality possibility :
preferences -> Use other program to open match result -> [program (path = %d line=%l) eg : TEXTPAD.EXE -am "N:\PATH\fckplugin.js"(80)]


ANSWER :
Thanks for your feedback on BareGrep. We are always keen to hear comments or questions. Thanks also for pointing us to the forum discussion.

We try to be guided by user feedback when planning features, so we will consider adding a feature to allow launching of a user-configurable program.

Would you like to be added to our product news email list, so you are automatically notified when we release a new version?

Best regards,
Leighton Brough

Bare Metal Software


WAIT AND SEE
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
Post Reply