[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] sample Python regexes, revisited
From: |
David Lawrence Ramsey |
Subject: |
[Nano-devel] sample Python regexes, revisited |
Date: |
Thu, 30 Mar 2006 13:42:14 -0500 |
User-agent: |
Thunderbird 1.5 (X11/20051201) |
John M. Gabriele wrote:
>When I type ''' or """ in my Python code, everything in the file before
>that triple-quote (up to the top of the buffer) gets syntax highlighted
>to that one solid color of brightgreen.
In the interest of fixing this problem (sorry for the delay), I've tried
to improve the sample Python regex from last time, but all I've come up
with is this:
syntax "python" "\.py$"
icolor brightblue "def [A-Z_0-9]+"
color brightcyan
"\<(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|return|try|while)\>"
color brightgreen "(["']).*[^\\]\1"
color brightgreen start=""""" end=""""" start="'''" end="'''"
color brightred "#.*$"
You said before that typing ''' or """ while using this regex would
highlight everything in the file before it. I can't seem to reproduce
that with either the old regex or the new one, but I don't write Python,
so my testing might be wrong. Could you please provide a sample file
that shows this? Thanks in advance.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] sample Python regexes, revisited,
David Lawrence Ramsey <=