Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: [Stata 9] Syntax Highlighting?

From   "Nick Cox" <>
To   <>
Subject   RE: st: RE: [Stata 9] Syntax Highlighting?
Date   Thu, 29 Sep 2005 21:06:08 +0100

Note that what is meant by syntax highlighting 
(or colouring) is somewhat variable. 

In some cases it is just different colouring applied 
to some Stata keywords. I am not clear how much help 
that is but it may brighten up an otherwise drab window. 

In other cases, a multiple colour scheme is 
used with distinctions between different kinds 
of language element. What is often impressive and useful
is that in some cases syntax colouring schemes highlight
small syntax mistakes you appear to have made. 

The schemes in editors I have
used, and presumably also in others I have not used, 
vary in the following respects: 

1. How far user-written program names are recognised
or recognisable. 

2. How far command name abbreviations are recognised
or recognisable. 

3. How far they understand subcommands following 
command names. 

4. How far they correctly capture compound double quotes
`" "', local macro quotes ` ' and string delimiter 
double quotes " ". As these can occur in various 
combinations, it is easy for a scheme to be thrown. 

5. How up-to-date they are. Each new release requires
an update to a syntax specification. 

That said, even a partial and out-of-date syntax 
specification can be of considerable help. Also, 
even if a Stata scheme is not available, some other 
scheme for a C-like language often works interestingly. 

What I know suggests as a conjecture that the most 
well-developed editors almost always provide powerful
facilities for people to specify a syntax colouring 
scheme. So, if you choose the best editor consistent 
with the operating system your heart prefers (which may 
not be what your fingers talk to) you will probably 
choose one with reasonable syntax highlighting. 


Roger Newson
> If Raphael is considering investing in a high-powered editor 
> for do-files 
> (or even in downloading one free), then the place to look is
> If Raphael is a Windows user and wants syntax highlighting, 
> then TextPad 
> might be a good editor to consider.
Nick Cox 
> >No.
> >
> >(I guess because syntax highlighting would entail
> >a disproportionate investment of programming
> >effort, and -doedit- is deliberately a minimal
> >editor. In practice users who want high-powered
> >text editors already use some favourite outside
> >-doedit-.)

Raphael Fraser

> > > Does Stata 9 Do-file Editor supports syntax highlighting?
> > >
> > > And for the folks at Stata Corp.; if the answer is no 
> then why not?

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index