Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

syntax highlighting - Can the editor highlight/mark local variables in contrast to global variables?

Is there an option in the IDE (or a free plug-in/tool) to mark local variables in a different color/font in contrast to global variables? If NO, how do you handle this? By var-name?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is no such option in the IDE and I'm not aware of any IDE plug-in that does it.

I use a naming convention (a prefix) to distinguish between various variable scopes:

G       for Global
F       for Field (variable in a class)
A       for Argument
Nothing for local variable

There are numerous other way to do it. Each developer has his own rules.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...