11

I'm new to emacs and programming in general so please bear with me. I'm trying to use emacs as my C/C++ IDE, and I noticed that in CC mode the variables/functions seemed to be highlighted only during declaration. My question is

  1. Is it possible to highlight variables, and functions on an entire cpp file
  2. If possible, what needs to be added to the .emacs file

Thank you

5

color-identifiers-mode does this for variables, if I understand your question correctly. rainbo-identifiers-mode too, I think. Screenshot is from the former one.

enter image description here

  • 1
    Note: at least for my fonts I can barely differ the colors. The solution is to add :weight ,'bold inside the color-identifiers:colorize function. – Hi-Angel Aug 14 '17 at 21:12
-1

zjl-hl.el on https://www.emacswiki.org/emacs/JianliZhao exactly matches your need.

The current default color theme is designed to be used with a white background.

zjl-hl screenshot

  • A precise link and a description of exactly what this claims to do would more helpful. Supplementing with a screenshot of this in action would also improve the answer. – Andrew Swann Jun 2 '16 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.