I've seen number of times emacs screenshots where modline is in color like this one:
How can I do this in emacs?
See the Elisp manual, node Properties in Mode.
Mode-line constructs can be complex - or simple. At their simplest they are strings. And you can propertize strings, i.e., give them text properties, including properties such as face that provide visual effects such as foreground and background color.
You can try packages like powerline, smart-mode-line which do lot of customization to mode line and has some inbuilt themes.
You can get various themes from airline-themes
Here is a screenshot of powerline theme
Related
Is it possible to customize the colors used by VSC background and text? I've tried all the color themes and none gives me what I need to see text clearly and comfortably. I can't find information on this in the Help, in the menus, or by searching on the Web.
I found the full list of color settings. I would imagine this would be useful to almost every user. It is at https://code.visualstudio.com/api/references/theme-color .
Using Helm, I noticed that helm isn't obeying (being compliant with) the theme colors, for example, on file selection?
Any simple way (preferably without messing on the theme file) to make helm comply with the theme colors?
Using emacs26 on linux
Simply...
If a theme doesn't have a configuration for the face in question, then that face won't be themed. A "face" is basically the term for the collection of properties of a given bit of text. For example, the lisp keyword lambda has the face font-lock-keyword-face. By default this has the property :foreground Purple giving you purple text on the default background. If I use a theme, Solarized for example, font-lock-keyword-face will be set to #859900 a lovely pale-ish green. Thus lambda (and any other bit of text defined as a "keyword") will be that color too.
Now, if the text you're looking at has the face helm-directory-selection-face for example (I made that face name up. I don't use helm), you'll be out of luck as you can see that Solarized doesn't have a config for for helm-directory-selection-face. At this point you really have two options, 1) change the definition of helm-directory-selection to use a different face or 2) add helm-directory-selection-face to your theme. If you want to do that, put the point (cursor) in the bit of text in question, then do C-u C-x =. This will generate a new *Help* window with all the properties at the point's location. Towards the bottom will be a small table of the text-properties. You'll want to add the value of face to your theme.
Most active theme authors are happy to take requests via their chosen support mechanism (github, email, etc.), especially if you provide a patch.
tl;dr
Just because a theme exists, doesn't mean that everything is themed. Add, the face in question to your theme, or hit up the theme's author, preferably with a patch.
I'm creating a custom colour theme extension for Visual Studio Code and I can't find out how to customise the colours for certain parts of the user interface. The theme is complete, apart from customising the reference popup window.
Here is the popup window I'm trying to customise:
I wish to change the blue background and if possible, the blue border lines. I'm sure this can be done because some of the built-in themes do so. Does anyone have an idea what I would need to put into the colour theme file to achieve this?
I'm also looking for pointers to customise the status bar colour (at the base of the editor).
As far as I know, this is not possible.
Some of the built-in themes are build differently. Most themes are textmate style themes, but you can see here that some of the built-in themes are .json files and are somehow handled differently.
You can find the theme documentation here. Specifically, this part is relevant:
Besides the TextMate language grammar standard scopes, VS Code also
has custom theme settings which you can use to tune your own theme:
rangeHighlight: Background color of range highlighted, like by Quick open and Find features.
selectionHighlight: Background color of regions highlighted while selecting.
inactiveSelection: Background color of selections when not in focus.
wordHighlight: Background color of a symbol during read-access, like reading a variable.
wordHighlightStrong: Background color of a symbol during write-access, like writing to a variable.
findMatchHighlight: Background color of regions matching the search.
currentFindMatchHighlight: Background color of the current region matching the search.
findRangeHighlight: Background color of regions selected for search.
linkForeground: Color of links.
activeLinkForeground: Color of active links.
hoverHighlight: Background color when hovered.
referenceHighlight: Background color of a reference when finding all references.
guide: Color of the guides displayed to indicate nesting levels.
You can find an example VS Code theme here which includes the custom
settings.
As we can see here, there is no special override for the references pane.
We can, though, see in the code that the dark blue for dark themes and the light blue for light themes that you're seeing in the references pane is a default value set in code here.
The colours for the UI itself are stored in the following file (ubuntu): /usr/share/code/resources/app/out/vs/workbench/electron-browser/workbench.main.css
You can edit that, or wait for March 2017 where a new version will be released which will allow customising these colours more easily.
Revisiting this in Sept/2022 out of necessity, I confirmed VS Code 1.70 has native support for manipulating colors for the Go to References/Definitions and Peek... overlays.
Change the overlay background and border as follows, but there's lots of other settings too; see peekView*
"workbench.colorCustomizations": {
"peekViewEditor.background": "#01041a",
"peekViewResult.background": "#054c8a",
"peekView.border": "#04fafa"
Since xterm supports only 16 colours, when you run emacs inside xterm, it automatically maps the myriad colours defined by the various syntax colouring modes to one of the 16 terminal colours. That's the behaviour I want to have on the emacs gui.
Is there a way to make the emacs gui believe that only the 16 terminal colours are available?
Also, can I disable mouse support in the emacs gui? What I want is the gui to behave exactly like emacs inside xterm.
Thank you in advance!
(If you wonder why I want this: After nearly 15 years running emacs inside xterm, I'm sure that's what suits me best.
However, my new employer is forcing me to work on a Windows workstation and now I'm compelled to use the native emacs gui because I haven't managed to get ecb to run with cygwin's emacs. I've already spent a lot of time trying to get the emacs gui to behave like emacs inside xterm, but I still have too many colours.)
Your best chance may be to just use a color theme that just uses 16 colors for all faces. The Solarized theme for example uses just about 16 colors even in a GUI Emacs. It still makes use of bold and italic fonts, though, and occasionally (and very rarely) uses some lighter color variants to emphasize text, which might already be too much for you.
You could also compile your personal set of 16 colours, and customize the faces of your Emacs to use only these colors.
I really like the Light Table color scheme but despite lots of Googling I can't seem to find an Emacs theme. I've made an attempt to recreate it but surely someone else has done this already.
It's a dark theme that looks like:
There's a load more example images on the Kickstarter page.
I made a theme based on the LightTable color scheme, I've just released it as a gist.
https://gist.github.com/3027622
FYI I'm publishing several new themes for Emacs24. There's a couple of other dark themes at https://emacsfodder.github.io/
Update
Here's a view of the font-lock (i.e. language generics, which are used by major modes to provide syntax highlighting.) definition with rainbow-mode.
Note:
In Emacs Lisp mode (CommonLisp & EmacsLisp are the closest things I know to Clojure.)
We can see that even local function usage isn't added to syntax highlighting:
(Having done a small check with clojure-mode, I can see the same thing going on there, defn's show their function name highlighted, but usage is in the default face color.)
For completeness it's probably worth adding this new answer here. There is now a LightTable theme for Emacs. It's called Noctilux:
https://github.com/stafu/noctilux-theme
Lighttable theme for Doom Emacs