I'm running Emacs, editing files in C++ mode and PHP mode. I love syntax highlighting as a concept, but the default colors are a travesty. I can barely read some of them: way too dark. What is the easiest way to change their values? I can't seem to find anything about this on the web. I don't even mind changing the binary as I'm compiling my own Emacs. I just want to find the place where it says blue is #0000FF and change it to #AAAAFF for example.
相关问题
- Symbol's function definition is void: declare-
- DBGrid - How to set an individual background color
- How can I set the SVN password with Emacs 23.1 bui
- Emacs shell: save commit message
- emacs bind key to the insertion of another
相关文章
- ess-rdired: I get this error “no ESS process is as
- Emacs/xterm color annoyance on Linux
- matplotlib bwr-colormap, always centered on zero
- MeshLab: How to import XYZRGB file
- Pipe less to Emacs
- Capturing the output of “diff” with org-babel
- emacs terminal mode: how to copy and paste efficie
- How to permanently enable the hs-minor-mode in ema
Put the cursor on a face ("color") that you want to change. Hit C-u C-x =. That will tell you which face(s) are present at that position, and it will let you click to customize it/them. Save your customizations.
If you don't care about color highlighting at all, or none of the above answers work for you (or take too much time and effort to figure out), here is a very simple solution that will get rid of colors altogether.
Typing the following will get rid of colors:
M-x global-font-lock-mode
You can also do this as an interim step to allow you to actually see everything your screen to try any of the above answers. In my case this was very useful because the color of certain key pieces of text which would allow me to change colors were themselves nearly invisible - for instance, the prompt of M-x.
If you want the change to be permanent, you can add this to your .emacs file:
(setq-default global-font-lock-mode nil)
I find it easiest to use color-theme for this sort of thing.
https://www.emacswiki.org/emacs/ColorThemes
But if you don't want to do that, put the cursor over the offending text, hit
M-x customize-face
. It should default to the face that the cursor is over.http://www.gnu.org/software/emacs/manual/html_node/emacs/Specific-Customization.html
2 ways - you can install the package color-theme, which has lots of nice schemes to select and is easier to do it by hand. The by-hand looks like this (in your .emacs)
...
etc. etc.
You can also type
which will give you all the customizations to set, ultimately end up in your .emacs.