How to highlight identifier under cursor in (any) Delphi IDE

If you place the cursor on an identifier (variable/function name/etc), CnPack will show you where that identifier is used in your code. Look for example how easy is to spot where the FBuffPos variable is used in the code below:

Also, see how “dangerous” instructions (“Exit”) have been marked in blue!

Note: On your Delphi installation, the colors might differ because I customized my CnPack plugin to my liking.

 

Update: Now, Delphi 12 can also do this trick – but still CnPack is more customizable. To enable it, go to Options -> Editor and activate Highlight words -> By cursor.

Delphi IDE Keyword highlight 1

Read more about this kind of customizations in my “Delphi in all its glory” books.

 

Leave a Comment

Scroll to Top