Tuesday, September 16, 2008

search through code, search through comments

Dear lazyweb,

I would love it if I could search through my code using my IDE, with the following options:
* Search all text in files
* Search only comments
* Search only non-comment code

My current favourite IDE is Eclipse/PyDev, but I'm not sure where to lodge queries easily, so here's my message in a bottle for the relevant developers. God speed, little bottle!

Cheers,
-Tennessee

1 comment:

  1. I can’t tell you about Eclipse, but spurred by this I wrote up an example using my grin module to do this.

    https://svn.enthought.com/svn/sandbox/grin/trunk/examples/grinpython.py

    To grep through non-string, non-comment code:

    $ grinpython.py --python-code "search term"

    To grep through comments:

    $ grinpython.py --comments "search term"

    To grep through strings:

    $ grinpython.py --strings "search term"

    The options can be combined.

    ReplyDelete