Thanks Chris,

That does the trick. I was just hoping there would be a way to set this 
universally. I use several languages with different comment characters so 
scripting all of them can become a hassle. Then again, I should get 
comfortable with BBEdit scripting.

Cheers,
Shiran

On Saturday, June 16, 2012 1:59:37 AM UTC-4, Christopher Stone wrote:
>
> On Jun 15, 2012, at 08:55, Gingi wrote:
>
> When I try to comment an indented block of code, BBEdit inserts the 
> comment characters at the beginning of the line instead of at the 
> indentation point. How do I change that behavior? I can't find any setting 
> for controlling this anywhere.
>
> ______________________________________________________________________
>
> Hey There,
>
> There are a few expert settings (in the help) that affect comments, but I 
> don't think any of them do what you want.  It's easy to script though:
>
> tell *application* "BBEdit"
> tell front *text window*'s selection
> *replace* "^([ \\t]*)(.+)" using "\\1// \\2" options {search mode:grep, case 
> sensitive:false}
> end tell
> end tell
>
> --
> Best Regards,
> Chris
>
>

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to