"non-essential difficulty" - syntax highlighting?

Shae Erisson shapr at uab.edu
Thu Jun 1 12:08:28 EDT 2000


Martijn Faassen wrote:
> 
> Shae Erisson <shapr at uab.edu> wrote:
> [snip]
> > The only other way I can think of to get around the case problem and not
> > get rid of case sensitivity is to have an IDE that's smart enough to
> > figure out when a variable or name is being created versus when it's
> > being modified and change the highlighting accordingly.
> 
> What about simply imitating the various shells around (I think there are
> even Python shells that do this..I think even IDLE does this, partially),
> and do name completion? If I type in some characters and they happen to
> be the first characters of a name known to the system, it'll spell it
> out completely (and of course provide a list in case of ambiguity).
> 
> If you get the case wrong in the first few letters, nothing will happen
> (or the ambiguity detector will kick in and offer suggestions). If you
> get the case right and it's unique, it'll just fill in the rest of
> the word in the case spelling you want.
> 
> That way newbies can be taught about this feature and won't have as many
> problems hopefully, and experienced programmers can do whatever they prefer.

I have a vague idea that I could hack together a bearable incremental
parser and much superior syntax highlighter for a python buffer by doing
parser.suite(line) everytime you leave a line, and then sewing the
pieces together manually.

There would obviously be more to it than that, ie. you'd have to special
case things like if x: lines and some others, but I think it would work.

I was thinking of doing it after the Python Refactoring Browser is
finished, but if someone wants to join me in coding this up, I can
change priorities. I would guess it would take a month or two.

Any suggestions, comments or offers of help?
-- 
sHae mAtijs eRisson (sHae at wEbwitchEs.coM) gEnius fOr hIre
   bRing mE fIve sQuirrels aNd nO oNe wIll gEt hUrt
13:00pm up 1 season, 1 squirrel, load average: 1+1j 0.5+2j 0.2+0.5j



More information about the Python-list mailing list