Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Text editor that has automatic table of contents?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Text editor that has automatic table of contents?
Date   Mon, 1 Mar 2010 17:57:44 -0000

This may seem too obvious, but I don't think you need any _special_
features for this (although no disrespect to any editor that does offer
this support). 

1. Use comments and/or blank lines to flag subdivisions. 

2. Invent your own conventions for section headings. 

3. If you use 1 or 2, then any decent editor will let you see only lines
of a certain form temporarily or let you jump between elements of a
certain form using some regular expression or other feature. 

In preparing a paper, I use !!! as a searchable flag for stuff that I
know needs to be filled in later. The trick clearly is to use something
that doesn't have a meaning otherwise. !! wouldn't qualify! ### or @@@
are other simple examples (for me). 

4. Subdivide the do file so that the details are in separate files with
informative names. Then use the master/mistress do file as a guide to
structure. 

5. Too many levels of nesting are as likely to hinder understanding as
help it. 

6. Never devise a scheme too complicated to explain to anyone else in a
minute. 

Nick 
n.j.cox@durham.ac.uk 

Dana Chandler

I just recently started using Notepad++ and am very happy with the
editor (especially after figuring out how to run do-lines from within
the program http://s281191135.onlinehome.us/2008/20080427-stata.html).

However, one thing that would be really great to have from a text
editor is an automatically generated Table of Contents. For example, I
frequently write my do-files in indented sections (e.g., prepare data,
clean data, analysis 1, etc.). Some LaTeX editors make use of the
section/subsection declarations to create a Table of Contents that you
can see and point-click to while editting.

Are there any text editors that utilize indentation to show the first
level or two of heirarchy so that I could have a sense of the whole
do-file? Also - even if you don't know of any text editors, are there
any tips that people who write their do-files in sections have to
offer for keeping track of the structure of very lengthy do-files?

Thanks in advance,
Dana
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index