Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-03

how to search in files but skip commented text

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dennis

When source files become big, the search function becomes very important. Does anyone share my desire for the Search function in Lazarus to be smart enough to skip those commented out texts?

I often comment out a portion of the source files before permanently deleting it (after I am really sure the new code is better than the old ones).

I hope the IDE will one day be smart enough to skip those commented text.

Also, sometimes I use meaningful english words as my routine and variable names. A search on those names will then also return those words in my commented txt.

Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160308/5257e398/attachment-0001.html>

Reply by email

Martin Frb
to Dennis
Dennis wrote 13 lines
When source files become big, the search function becomes very important. Does anyone share my desire for the Search function in Lazarus to be smart enough to skip those commented out texts? I often comment out a portion of the source files before permanently deleting it (after I am really sure the new code is better than the old ones). I hope the IDE will one day be smart enough to skip those commented text. Also, sometimes I use meaningful english words as my routine and variable names. A search on those names will then also return those words in my commented txt.

You can use find identifier references. IIRC that can skip comments. But it also skips identifiers of the same name, if they are not the same (e.g a field of equal name defined in a different class, or local var)

Another method with similar results, is to add "deprecated 'find me';" to the identifier you are interested, and compile. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160308/cb5a56ea/attachment.html>

Reply by email