Page 1 of 1

Search Files & Cross File Searches

Posted: Tue Oct 04, 2016 10:27 am
by xolotl
Hi all.
Just wondering if CodeLite has the following functionality; having searched the forums and tried to nut it out myself.

Search the entire project. "Search -> Find in Files" should be it but for me it searches 0 to 2 files. I even right click on the root (Workspace / Explorer) and try it from there.
Similarly, I would like to CTRL + Click a class and have it search and show related classes in the project.

Trying to use CodeLite instead of the bloated NetBeans. Great IDE guys :D

Re: Search Files & Cross File Searches

Posted: Tue Oct 04, 2016 1:34 pm
by eranif
"Search -> Find in Files" should be it but for me it searches 0 to 2 files
This usually means that the "File Mask" field is just wrong. i.e. if you are searching for PHP files, make sure that the file mask contains "*.php"
fif.png
I would like to CTRL + Click a class and have it search and show related classes in the project
In C++ workspace the shortcut is Alt+Click. This is not implemented for PHP/NodeJS
For PHP you can use Alt-G or Ctrl-Shift-R to find resource

Eran

Re: Search Files & Cross File Searches

Posted: Wed Oct 05, 2016 7:20 am
by xolotl
Thanks Eran!
That information was on the money :).

Alt + G opens settings. Is that correct?

Ctrl-Shift-R finds resources, so that helpful.
I was hoping to be able to click directly to a CSS class as this is a real time saver.
Does CodeLite have a roadmap?

Re: Search Files & Cross File Searches

Posted: Wed Oct 05, 2016 9:57 am
by eranif
xolotl wrote:Alt + G opens settings. Is that correct?
It is the default shortcut for : Search->Find Symbol

On some platforms, it is bound to the menu bar entry with the proper mnemonic (the letter with the underscore), so it opens for you the "settings" menu (g has the underscore)

You can change the Alt-G to something else from: settings->keyboard shortcuts, type in the filter box: "find symbol"

Eran

Re: Search Files & Cross File Searches

Posted: Wed Oct 05, 2016 10:16 am
by eranif
I will throw here another tip that not many people are aware of, but is incredibly useful:

The find-in-files supports grep like searches using "|" ("pipe")

e.g. if you want to find a class definition of a class named "MyClass", you can type in the "Find what":

Code: Select all

MyClass|class
By doing this, CodeLite will first search for all the occurrences of "MyClass", next it will keep only the matches that also have the word "class"

Eran

Re: Search Files & Cross File Searches

Posted: Thu Oct 06, 2016 6:28 am
by xolotl
Thanks again. The pipe and other grep operands will sure come in handy.