Is there python code highlighting in emacs ?
John McMonagle
jmcmonagle at velseis.com.au
Wed Mar 21 23:37:13 EST 2001
>
> > >
> > > The hilit19 package in emacs provides keyword highlighting when editing
> > > code. For example, if you are writing in C, comments are italicised in
> > > red, strings are in grey, import statements are in lavender, functions
> > > are in bold-blue, etc.
> > >
> > > Does anyone know if there is python support in the hilit19 emacs lisp
> > > package ?
> >
> > I don't know about hilit19, but I use python-mode which highlights
> > using font-lock-mode. Comes with GNU Emacs 20.whatever. Try M-x
> > python-mode and see if anything happens.
> >
> > python-mode does many other useful things, too. I can't imagine
> > working without it at this point.
> >
>
> I already use python-mode which works fine for indenting, etc. How do I
> configure this font-lock-mode for python ? What do I add to my .emacs
> file ?
>
Worked it out.
Add the following to your .emacs file:
(add-hook 'python-mode-hook '(lambda() (font-lock-mode 1)))
More information about the Python-list
mailing list