thane norton | 1 Mar 2007 13:37

CLM Help

I know.  Codeless language modules have been beaten to death on the
list.  I have a tough one, and I need some help.  I have a pretty good
CLM for Alloy that can be found here:

http://vtn3.com/AlloyLanguage.plist

Currently the Function Pattern is this:

<string><![CDATA[(?x:
  (?P<function>
    ^\s*
    (abstract\s+)?
    (?>
      (sig) |
      (fact) |
      (fun) |
      (pred) |
      (run) |
      (check) |
      (assert)
    )
    \s+
    (?P<function_name>
      [0-9A-Z_a-z]+
    )
    \s[^{\n\r]*?
    (?P<function_body>
      (?>
        \s*
        (?>{[^}]*})
(Continue reading)

Brad Ummer | 1 Mar 2007 18:57

Change CSS comment formatting to maintain single line

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 <support <at> barebones.com>, 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:  <bbedit-talk-off <at> barebones.com>
(Continue reading)

Dennis Dowling | 1 Mar 2007 23:18

Re: Change CSS comment formatting to maintain single line


	If you've selected the entire line with cmd-L then it will put the comments outside the line breaks
resulting in three lines. To limit the comments on a single line you need to select just the text without the
line breaks. 

	Instead of cmd-L try... cmd-RightArrow, then cmd-Shift-LeftArrow, then Comment.
	
	Otherwise, you could build your own custom comment action. Set-up a custom script or text factory to
basically do a short search/replace to insert comment tags inside your first/last line breaks - then set a
menu key for that. 

	- Den.
	

3/1/07 12:57 PM: brad <at> flipsidemedia.com (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:
(Continue reading)

Dennis Dowling | 1 Mar 2007 23:35

Re: Change CSS comment formatting to maintain single line


	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: brad <at> flipsidemedia.com (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 >
(Continue reading)

Roland Küffner | 2 Mar 2007 11:19
Picon

Re: Change CSS comment formatting to maintain single line

... 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
(Continue reading)

Brad Ummer | 2 Mar 2007 19:32

Re: Change CSS comment formatting to maintain single line

First, I apologize for the delayed response- I'm in digest mode.  Thanks for the suggestions.  Regarding the
fact that I cannot do what I want by default since I'm using Cmd-L to select the entire line, this inability
is new to (or at least a change with) recent versions of BBEdit.  I have an older version of BBEdit (8.2.6)
running on a old computer (OSX 10.3.9), and doing Cmd-L followed by Un/Comment selection works exactly as
I want- the starting and ending comments are all on the same line.  However on my new computer (BBEdit 8.6.1
on 10.4.8) doing the exact same procedure results in the command being on three lines.  On that older BBEdit
I had the commenting set (under Tools > Un/Comment Settings) such that the starting and ending tags were
specified.  As I noted previously, the preferences in the current version of BBEdit doesn't list anything
for the CSS starting and ending tags, a
 nd the boxes are actually grayed out.

I guess my question is simply can I get the old functionality back?  If not then I'll implement a AppleScript
solution.  Thanks again.

On 3/2/07 Dennis Dowling <den <at> bmxweb.com> List wrote:
>	If you've selected the entire line with cmd-L then it will put the comments outside the line breaks
resulting in three lines. To limit the comments on a single line you need to select just the text without the
line breaks.

- Brad Ummer

--

-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <support <at> barebones.com>, 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:  <bbedit-talk-off <at> barebones.com>

(Continue reading)

Jim Correia | 2 Mar 2007 19:39

Re: Change CSS comment formatting to maintain single line

On Mar 2, 2007, at 1:32 PM, Brad Ummer wrote:

> First, I apologize for the delayed response- I'm in digest mode.   
> Thanks for the suggestions.  Regarding the fact that I cannot do  
> what I want by default since I'm using Cmd-L to select the entire  
> line, this inability is new to (or at least a change with) recent  
> versions of BBEdit.  I have an older version of BBEdit (8.2.6)  
> running on a old computer (OSX 10.3.9), and doing Cmd-L followed by  
> Un/Comment selection works exactly as I want

On my machine, 8.2.6 behaves the same as 8.6.1.

> the starting and ending comments are all on the same line.  However  
> on my new computer (BBEdit 8.6.1 on 10.4.8) doing the exact same  
> procedure results in the command being on three lines.  On that  
> older BBEdit I had the commenting set (under Tools > Un/Comment  
> Settings) such that the starting and ending tags were specified.   
> As I noted previously, the preferences in the current version of  
> BBEdit doesn't list anything for the CSS starting and ending tags,  
> and the boxes are actually grayed out.
>
> I guess my question is simply can I get the old functionality back?

With 8.6.1, there is no configuration option which will do what you  
want; you'll have to use a script or #! filter.

BBEdit will put the comment delimiters on separate lines for when the  
comment is at least one line long, and will put them on the same line  
for a partial line CSS comment.

(Continue reading)

Allen Watson | 2 Mar 2007 20:17
Picon

Re: Change CSS comment formatting to maintain single line

On 3/2/07 2:19 AM, "Roland Küffner" <newsletter <at> rolandkueffner.de> wrote:

> 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

And changing "add" to "remove" will uncomment a line.
-- 

Allen Watson  . Writer/Webmaster  [ p.  503 .281 .0250   m.  503 .916 .9411
e.  watson.allen <at> comcast.net
homepage.mac.com/allen_a_watson/

--

-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <support <at> barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
(Continue reading)

OmniPilot ListSearch.com | 4 Mar 2007 07:00

[Stats] BBEdit Talk: February 2007

Contents:
---------
1) BBEdit Talk Stats: February, 2007
2) BBEdit Talk Searchable Archives

======================================================================
1. BBEdit Talk Stats: February, 2007
======================================================================

Note: Up/Down % as compared with January, 2007

Posts:   102 (Down 31%)
Authors:  53 (Down 20%)
Threads:  21 (Down 52%)

Top 20 Contributors by Number of Posts
----------------------------------------------------------------------
Manuel Souto Pico                                                    9
Eric Gorr                                                            6
Doug McNutt                                                          6
Michael Heth                                                         5
Richard Dyce                                                         4
Rich Siegel                                                          3
Google Kreme                                                         3
Ronald J Kimball                                                     3
Eric Bergman                                                         3
John Allen                                                           3
Steven Elliott                                                       2
Steve Kalkwarf                                                       2
Jack Hodgson                                                         2
(Continue reading)

David Gilden | 4 Mar 2007 19:14

comment and uncomment a block of code BBE 8.2.6

re:  taking a stab at Applescript

Greetings,

I am trying to write a script that will comment and uncomment a block of code
i.e.

if (x<y) 
{
...
} 
after running the script:
/*
if (x<y) 
{
...
} 
*/
-- and be able to uncomment a block as well!

-- script --

tell application "BBEdit"
    activate
    add prefix selection of text window 1 prefix "/* "

    find "\\Z" searching in selection options {search mode:grep} with selecting match

    insert text  "*/" & return  -- this line does not work
end tell
(Continue reading)


Gmane