A Python color syntax file for VIM

Neil Schemenauer nascheme at enme.ucalgary.ca
Sun Oct 3 20:59:39 EDT 1999


Alan Daniels <daniels at mindspring.com> wrote:
...
>I've always noticed that the default syntax highlighting for
>Python is sort of Spartan, in that it colors strings and
>keywords, and thats about it.

This is intentional.

>This is just a test of better syntax highlighting...

To adapt a quote on threads:

    Syntax highlighting is like salt.  I like salt, you like
    salt, we all like salt, but we eat more pasta than salt.

IMHO, your version highlights too much stuff.

I just noticed that the latest version of Vim does not include my
latest syntax file for Python.  I have included some of your
changes and submitted a new version to Bram.  Hopefully he will
include it in the next version of Vim.  If you can't wait you can
get it here:

    http://adler.dynodns.net/~neil/vim/syntax/python.vim

One of the major changes in this version is that function and
class names are highlighted.  This is consistent with emacs and
IDLE.

There is also support for highlighting numbers but it is disabled
by default.  I feel this hurts readability rather than helping
it.  Why are numbers in code so special that we have to make them
a different color?  Lots of other syntax files do this so I guess
some people must like it.

I don't want to ram my beliefs down everbody's throat though.
Users of python.vim, please vote:

    a) more highlighting
    b) less highlighting
    c) its perfect, don't mess with it

If I get enought votes I will post a summary.  I guess emacs (and
IDLE) users can vote too as they highlight similar to Vim.


    Neil





More information about the Python-list mailing list