I program Django/Python in emacs, and I would like things like {% comment %} FOO {% endcomment %} to turn orange.
How can I set up some colors for important Django template tags?
I program Django/Python in emacs, and I would like things like {% comment %} FOO {% endcomment %} to turn orange.
How can I set up some colors for important Django template tags?
Here's what I do. It's a little more general than the code above, and it uses the built-in font-lock mechanisms.
Here are some links. I found them on the Google. It seems there is no one fully-complete and "official" solution to this problem, but a number of possibly quite usable substitutes avaliable.
You could use dedicated modes like django-mode or MuMaMo.
If you want something very basic, and assuming you're editing in
html-mode
, you could try the following:(Just add the above lines to your
.emacs
orinit.el
, and eval it or restart emacs).