|  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st:  Apple Script to Comment Lines  in Text Wranger/BBEdit
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/