[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
David Airey <david.airey@Vanderbilt.Edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Apple Script to Comment Lines in Text Wranger/BBEdit |

Date |
Sun, 28 Sep 2008 21:05:52 -0500 |

Thanks! -Dave On Sep 28, 2008, at 7:59 PM, Steven Samuels wrote:

Thanks to John Gardner, an improved version of the script is available at:

http://dataninja.wordpress.com/2008/09/27/unified-generic-commentuncomment-scripts/

The new script happily borrows techniques from John's original Comment and Uncomment scripts (http://dataninja.wordpress.com/2006/05/08/textwrangler-uncomment-scripts-for-stata/ ).

It is a) faster and b) "generic", in that it will recognize other languages. R and LaTex are currently included and it is easy to add more.

The script determines if the first character of a selection starts a comment or not; if not, a comment is added to every line of the selection; if not, a comment present at the start of a line is deleted.

Note that "comment" here means "// " (space following the slashes)

Other points.

--To add comments, start the selection in a line that is not commented.

--To delete comments, start the selection with a commented line.

--If nothing is selected, the script will comment or uncomment the current line.

-Steve

*

* 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/

**References**:**Re: st: Re: undocumented command ****From:*Maarten buis <maartenbuis@yahoo.co.uk>

**Re: st: Apple Script to Comment Lines in Text Wranger/BBEdit***From:*Steven Samuels <sjhsamuels@earthlink.net>

- Prev by Date:
**Re: st: Apple Script to Comment Lines in Text Wranger/BBEdit** - Next by Date:
**st: MIME-Version: 1.0** - Previous by thread:
**Re: st: Apple Script to Comment Lines in Text Wranger/BBEdit** - Next by thread:
**Re: st: undocumented command *** - Index(es):

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