I just started using linux mint and it's fairly good but the default terminal e-macs mode has painful to read commented code as well as strings for c++ (text enclosed in either /* */, " ", // ).

My system is an xps 13 using Linux Mint 18.3 Cinnamon. Here is an example which may or may not display on some systems

enter image description here

How can this extreme contrast be changed without changing much else about the terminal?


Thanks to @ErikF for showing me the related question. One can change the color by doing the following steps. Go to a cpp file and put the cursor on a comment. Hit the command:

M-x customize-face

You should see Customize face (default font-lock-comment-face'): , hit enter.

You then should get a new screen. Maneuver the cursor to "choose" in the line [X] Foreground: color-63 [ Choose ] (sample) (the color will be different).

A dropdown will appear with the various colors, pick the one you want. Afterward maneuver the cursor to "Apply and Save", hit enter and you are all set. I didn't change the "string" color because I liked the way it looked after the change but it should be the same.


You could also try using vim.

Vim also has syntax highlighting, and you have a few easy options if you dislike the current display

:set bg dark
:set bg light

Above depending on your terminal background.

:syntax on

To turn on syntax highlighting

To change the display colour scheme, you can use the :colo command.

My favourite is "ron":-

:colo ron
:colo <ctrl-d> will show all the available schemes, e.g. "ron", "pablo", "peachpuff"...

Hope that helps.

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.