Hi Stam,


Take a look at 
https://www.barebones.com/support/develop/clm.html#ExREComments.


You could leave empty all the BBLMComment* keys and add this to your plist:


*<key>Comment Pattern</key>*

*<string><![CDATA[*

*(?x)                (?# Allow comments and ignore whitespace even in 
classes.)*

*(?-s)               (?# Dot doesn't match newlines.)*

*(\#|--|\/\/)        (?# Single line comment prefixes.)*

*.*                  (?# Rest of the line)*

*$                   (?# End of line.)*

*]]></string>*


Here is an imaginary Stam Codeless Language Module that would be applied to 
files with .stam extension.

Name it *~/Library/Application Support/BBEdit/Language 
Modules_out/Stam.plist *and restart BBEdit.


*<?xml version="1.0" encoding="UTF-8"?>*

*<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>*

*<plist version="1.0">*

*<dict>*

*    <key>BBEditDocumentType</key>*

*    <string>CodelessLanguageModule</string>*

*    <key>BBLMColorsSyntax</key>*

*    <true/>*

*    <key>BBLMIsCaseSensitive</key>*

*    <false/>*

*    <key>BBLMLanguageCode</key>*

*    <string>Stam</string>*

*    <key>BBLMLanguageDisplayName</key>*

*    <string>Stam</string>*

*    <key>BBLMSuffixMap</key>*

*    <array>*

*        <dict>*

*        <key>BBLMLanguageSuffix</key>*

*        <string>.stam</string>*

*        </dict>*

*    </array>*

*    <key>Language Features</key>*

*    <dict>*

*        <key>Identifier and Keyword Character Class</key>*

*        <string>\p{L}\p{N}\-</string>*

*        <key>Comment Pattern</key>*

*        <string><![CDATA[*

*        (?x)                (?# Allow comments and ignore whitespace even 
in classes.)*

*        (?-s)               (?# Dot doesn't match newlines.)*

*        (\#|--|\/\/)        (?# Single line comment prefixes.)*

*        .*                  (?# Rest of the line)*

*        $                   (?# End of line.)*

*        ]]></string>*

*    </dict>*

*</dict>*

*</plist>*



For help on regular expressions, see BBEdit > Help > BBEdit Help > Grep 
Reference.


HTH


Jean Jourdain
On Sunday, August 11, 2024 at 6:51:01 PM UTC+2 Stam Kapetanakis wrote:

> Hi all,
> I've found an old pList used for LiveCode within BBEdit.
>
> Just have an issue with line commenting. The old file only had 1 
> commenting style:
>
> *<key>BBLMCommentLineDefault</key> <string>#</string>*
>
> followed by the multiline commenting:
> *<key>BBLMCommentPrefixDefault</key>*
> *<string>/*</string>*
> *<key>BBLMCommentSuffixDefault</key>*
> *<string>*/</string>*
>
>
> but in this language there are 3 styles for single line comments: "//", 
> "#" and "--"
>
> I thought I'd be clever and change the single line comment key to:
>
>
>
>
>
>
> *<key>BBLMCommentLineDefault</key> <array> <string>#</string> 
> <string>--</string> <string>//</string> </array>*
>
>
> everything works except "--" 
> I suspect none of this made any difference BBEdit was processing "//" and 
> "#" as default 
> markers for a comment line.
>
> *Question*: How can I make BBEdit treat "--" as start of. comment line?
>
> Many thanks
> Stam
>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or believe that the application isn't working correctly, please email 
"[email protected]" rather than posting here. Follow @bbedit on Mastodon: 
<https://mastodon.social/@bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/e5910f35-911f-4b61-b510-4473108ff56bn%40googlegroups.com.

Reply via email to