Highlight all variable occurences in IDE

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Highlight all variable occurences in IDE

Post by Kukulkan »

In many other editors, all variables like the one the cursor currently is on, are highlighted. This helps to find all places where this variable is used.

Image

The orange arrow shows the cursor over the $c variable (yes, it is PHP). The other occurences of this variable are highlighted using a light yellow background. This is very helpful if you like to refactor or if you are searching bugs.

BTW, this is PhpED from Nusphere (http://www.nusphere.com/products/phped.htm).

Kukulkan
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Highlight all variable occurences in IDE

Post by MachineCode »

+1
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Kiffi
Addict
Addict
Posts: 1487
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Highlight all variable occurences in IDE

Post by Kiffi »

That would be very useful!

Greetings ... Kiffi
Hygge
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: Highlight all variable occurences in IDE

Post by nco2k »

i agree, this is a killer feature. :)

http://www.purebasic.fr/english/viewtop ... =3&t=41842

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

Re: Highlight all variable occurences in IDE

Post by Blood »

It should be an option.
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Highlight all variable occurences in IDE

Post by c4s »

I like this feature very much in Notepad++, although it could be improved to (optionally) not highlight in comments, strings etc.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Highlight all variable occurences in IDE

Post by Shield »

Blood wrote:It should be an option.
Definitely. It's actually one of the first "features" I disable in other editors because
it annoys me and doesn't have any purpose for me whatsoever. :wink:
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

Re: Highlight all variable occurences in IDE

Post by Blood »

Shield wrote:
Blood wrote:It should be an option.
Definitely. It's actually one of the first "features" I disable in other editors because
it annoys me and doesn't have any purpose for me whatsoever. :wink:
Me too.
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Highlight all variable occurences in IDE

Post by Kukulkan »

nco2k wrote:i agree, this is a killer feature. :)

http://www.purebasic.fr/english/viewtop ... =3&t=41842

c ya,
nco2k
Oh, I missed this. Sorry. But now it is mentioned twice :D

Surely, this must be an option that can get switched on and off.

Kukulkan
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Highlight all variable occurences in IDE

Post by Tenaja »

+1 for adding this feature. It is one of the big reasons I use Notepad++.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Highlight all variable occurences in IDE

Post by Didelphodon »

+1
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Highlight all variable occurences in IDE

Post by Didelphodon »

actually this feature would perfectly work together with another feature: a birds eye view (on the right to the vertical scrollbar) which shows you all occurrences in the source. Would also be cool for ctrl-f.
Go, tell it on the mountains.
Post Reply