Variables search

What do you think about a specific search for variables, searching only for a variable with that name, not simply that characters in the sketch? It will show where a variable is used and if it is still in use or it can be deleted. The function could also make a list of all variables, ports, EEPROM locations and variables associated.

There are command-line utilities that build a database that allows this sort of thing, and would theoretically be usable from something like the Arduino IDE without having to re-implement all of the details. In particular, there are the "ctags/etags" utilities (which I guess only BUILD the database), and the "id utils" package that has both db generation and several query utilities:

I use both rather extensively on larger SW projects. (It's one of the reasons that I don't get to excited by fancy IDEs. Yes, it's somewhat nice to have all those bells and whistles built-in. But sometimes it's more efficient to have them off "separate" where they don't cause performance problems, and you can more easily manipulate the output...

This is really a neat idea! I took the liberty to take a stab at it in a fork (still a wip) I have been playing with. I would very much appreciate if you have any other thoughts about what would make the feature most helpful.