What is the Emacs mode or package that highlights Lisp forms changing the color of the backgrounds so that the form you are in has one color, the outer form another, the outer outer form another and so on?
You may want to try mwe-color-box (screenshot below) or read Five approaches to s-expression highlighting by Lemondor.
(source: foldr.org)
Take a look at screenshots here http://lemonodor.com/archives/001207.html, may be that is what you want.
I don't use it, but this might be what you're looking for:
http://www.emacswiki.org/emacs/RainbowDelimiters
Related
I do love thin fonts, so I have following customisation in my .emacs:
(set-frame-font "NK57 Monospace-14:weight=light" t)
This works as expected, however this does not tells Emacs that it should render embolden text with lighter weight too, e.g. to use medium instead of regular weight, so there is dramatically difference in weights, see picture below.
How can I tweak this?
Well, it is possible to customise default bold face using customize-face command as was mentioned by lawlist (i.e. Easy Customization).
However, this is not enough in most cases, because of some packages or themes could introduce another customisations, which overrides default one (e.g. font-lock-function-name-face, font-lock-keyword-face) and could be found in face customisation menu too.
The question says it all. I would like to change the background color of all sections labeled with a particular tag (e.g. :WORK:) in my org-mode file. I found out how to change the colors of the TODO states, but I wasn't successful in changing the color of the whole line. Can that be done? Thanks a lot in advance for your help.
You can use font-lock-add-keywords:
(font-lock-add-keywords 'org-mode
'(("^.*:write:.*$" . font-lock-keyword-face)))
See C-h f font-lock-add-keywords RET for details.
There is no such code that's ready to copy or use, AFAICT. Though, I'm sure it can be done, but will require hand-made code.
However, if you'd be interested to have such highlighting in the agenda buffer, you should check out some post of John Wiegley, a couple of years ago.
I've seen that when I write a function in coffeescript-textmate it colors the name of function
pleasePutMeSomeColor = () -> console.log "textmate works great!"
in this example pleasePutMeColor is colored inside textmate. This allows me to recognize which are functions much quicker. But when I write the same example inside emacs this word isn't colored. It is harder to identify which are functions.
Is there a way to highlight functions with a different color in emacs?
Are you using defunkt's coffee-mode? That's the only CoffeeScript syntax highlighting plugin for Emacs that I'm aware of; it's under active development, so feel free to submit an issue if you have a specific suggestion.
yup...I'm going to answer my question:
Inside github there is a defunkt coffee-mode fork that adds syntax highlighting for functions.
https://github.com/handle/coffee-mode
It isn't perfect but works well...I hope that it will be added to the official coffe-mode repo.
Is it possible to select a piece of text you're editing and change its color? I know it's possible to create a color theme that will color certain kinds of text (like for example coloring functions in a certain programming language), but is it possible to do a one time color change to a selected piece of text in a specific emacs document without creating a theme? thanks in advance.
A theme doesn't allow you to specify the color of arbitrary text in any case. It only describes a set of face to be used by font-lock.
To apply a face to an arbitrary piece of text, select the text, then M-: (add-text-properties (region-beginning) (region-end) '(face font-lock-warning-face))
See the faces section of the elisp manual on how to create a face.
Emacs also comes with the hi-lock package, which can highlight regexps or lines containing regexps. See manual
how about M-x highlight-phrase ?
I know six years is a pretty long time, but I stumbled across this question and, after a lot of research, I did not find anything nearly as objective as what I eventually dug out for myself.
To color say, the first 200 characters in your buffer, execute the command:
(put-text-property 1 200 'face (cons 'foreground-color "red"))
If you need help executing this command in emacs, here is one possibility among many:
Type ESC-x eval-expression.
Type or paste the above command in the mini-buffer after the prompt.
Press ENTER.
You might like to look at enriched-mode.
If you are in a buffer that isn't controlled by font-lock, you can use 'facemenu'.
For example, highlight a bit of text, then with the mouse, press C-mouse-2. You can then select a face (some combination of text properties with a name). You can also pick random forground or background colors.
If you Emacs is particularly old, I seem to remember something similar on M-g.
Try set-background-color, set-foreground-color, set-cursor-color.
Changes won't be saved with the document though.
Note:
When I try those functions, they don't set the region's color unless I go through the menus.
See http://www.emacswiki.org/emacs/HighlightTemporarily (and it need not be temporary).
You can "color" text by swiping it with the mouse, or matching it with a regexp, and several other ways. Library highlight.el, in particular, lets you "color" text in many ways.
In other words, a block of code like this:
(setq initial-major-mode
(lambda ()
(text-mode)
(font-lock-mode)
))
... would come out looking like something like this:
If something like this already exists, what is it? And if it doesn't exist, how should I go about writing it?
I think you are looking for something like mwe-color-box.el
There is the package rainbow-delimiters, which doesn't do exactly what you want, but does just colorize the parentheses - which is a nice subset and allows you to still see the other syntax highlighting provided by the major mode.
If you need this to help editing, then I suggest turning on coloring the innermost sexp which contains the cursor with a different background color. At least I'm used to this and it is sufficient.
http://nschum.de/src/emacs/highlight-parentheses/ lets you highlight just the parentheses.