... there has been some code on the list some time ago which can be
used to extend Den's script even further. With this you don't even
have to select a line. It works simply on the line the cursor is in:
tell application "BBEdit"
activate
tell text window 1
set firstLineIndex to startLine of selection
set lineLength to length of line firstLineIndex
if lineLength is 0 then
select insertion point before line firstLineIndex
else
select characters 1 through lineLength of line
firstLineIndex
end if
end tell
add prefix and suffix selection of text window 1 prefix "/* " suffix
" */"
end tell
happy commenting,
Roland
Am 01.03.2007 um 23:35 schrieb Dennis Dowling:
Here's a script you can use with a whole line selected - easier
than setting up a replace.
tell application "BBEdit"
activate
add prefix and suffix selection of text window 1 prefix "/* "
suffix " */"
end tell
- Den.
3/1/07 12:57 PM: [EMAIL PROTECTED] (Brad Ummer) apparently
typed...
I'm sorry if this has already been answered, but I searched
through the manual and the listsearch for the mailing list doesn't
seem to be working right now
(Internal server error). When I apply the Un/Comment selection to
a single line in a .css file, it makes the comment into three
lines, but I'd rather it all
stayed as one line. For example, if I have this line:
font-size:18px;
and select the entire line (using Cmd-L) and then do Un/Comment
selection, I end up with this:
/*
font-size:18px;
*/
whereas I'd rather have this:
/* font-size:18px; */
I tried to change this functionality via "BBEdit Preferences >
Languages > Installed languages > CSS > General" where there is a
setting to change the
comment start and end, but it's greyed out. Is there some other
way to change this? Thanks.
- Brad Ummer
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>