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

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

From   Steven Samuels <>
Subject   Re: st: Apple Script to Comment Lines in Text Wranger/BBEdit
Date   Sun, 28 Sep 2008 20:59:13 -0400

Thanks to John Gardner, an improved version of the script is available at: commentuncomment-scripts/

The new script happily borrows techniques from John's original Comment and Uncomment scripts ( 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.

* For searches and help try:

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