Now to figure out how to make it go ahead and color the comments just for 
the fun of it.  But that is for after work Travis

On Thursday, September 15, 2022 at 2:56:06 PM UTC-5 Travis Edrington wrote:

> Your right it doesn't do comment folding.  I will use your method 
> instead.  Thank you.
>
> On Thursday, September 15, 2022 at 3:38:09 AM UTC-5 jj wrote:
>
>> Hi Travis,
>>
>> There are a few issues with your module.
>>
>> 1. BBEdit reports an error in your module
>>
>>     Menu BBEdit > Folders > Logs
>>     Check 
>> ~/Library/Containers/com.barebones.bbedit/Data/Library/Logs/BBEdit/Language 
>> Module Errors.log
>>
>>         
>> ================================================================================
>>         2022-09-15 10:30:24.678: Startup
>>         The following problem(s) were encountered while loading the 
>> language module at ~/Library/Application Support/BBEdit/Language 
>> Modules/foldingtext.plist:
>>             The Comment Pattern was invalid (missing closing parenthesis 
>> (error 112114) at offset 224 in pattern).
>>         The reported problems will prevent the language module from 
>> loading.
>>
>>     This is due to the '#' characters not being escaped in '(?s:^#.*?#$)' 
>> when using the (?x) modifier. Should be '(?s:^\#.*?\#$)' .
>>
>>  2. Not sure if Codeless Language Modules will do Comment Pattern 
>> folding.  You could use Function Pattern folding instead.
>>      
>>     <?xml version="1.0" encoding="UTF-8"?>
>>     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
>> http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
>>     <plist version="1.0">
>>     <dict>
>>         <key>BBLMCanSpellCheckCodeRuns</key>
>>         <true/>
>>         <key>BBLMCommentPrefixDefault</key>
>>         <string>#</string>
>>         <key>BBLMCommentSuffixDefault</key>
>>         <string>#</string>
>>         <key>BBLMCommentLineDefault</key>
>>         <string>//</string>
>>         <key>BBEditDocumentType</key>
>>         <string>CodelessLanguageModule</string>
>>         <key>BBLMColorsSyntax</key>
>>         <true/>
>>         <key>BBLMIsCaseSensitive</key>
>>         <false/>
>>         <key>BBLMLanguageCode</key>
>>         <string>txtF</string>
>>         <key>BBLMLanguageDisplayName</key>
>>         <string>Folding Text</string>
>>         <key>BBLMScansFunctions</key>
>>         <false/>
>>         <key>BBLMSuffixMap</key>
>>         <array>
>>             <dict>
>>                 <key>BBLMLanguageSuffix</key>
>>                 <string>.txt</string>
>>             </dict>
>>         </array>
>>         <key>BBLMScansFunctions</key>
>>         <true/>
>>         <key>BBLMFunctionScannerDoesFoldsToo</key>
>>         <true/>
>>         <key>Language Features</key>
>>         <dict>
>>             <key>Identifier and Keyword Character Class</key>
>>             <string>\p{Xwd}</string>
>>             <key>Function Pattern</key>
>>             <string><![CDATA[(?x)(?s)
>>     (?P<function>
>>         (?P<function_name>
>>             //[^\v]*                    (?# Line comment using //)
>>         |
>>             \/\*.*?\*\/                 (?# Block comment using /* */)
>>         |    
>>             ^\#.*?\#$                   (?# Block comment using #...#)
>>         |
>>             ^<!--.*?-->$                (?# Block comment using <!-- -->)
>>         )
>>     )
>>     ]]></string>
>>         </dict>
>>     </dict>
>>     </plist>
>>
>> HTH,
>>
>> Jean Jourdain
>>
>> On Wednesday, September 14, 2022 at 11:18:04 PM UTC+2 trais...@gmail.com 
>> wrote:
>>
>>> I use BBEdit for all of my generic text needs, but one thing I love from 
>>> programming that is not available (as far as I can tell) is folding for 
>>> generic text files.  Sometimes when I am using Bbedit for notes I will 
>>> create blocks like I am writing code.  I wanted to be able to fold these 
>>> blocks out of the way when I don’t need them.  I decided to make a Language 
>>> Module that lets me add comments and blocks using common programming 
>>> comment styrax like // or /* */ or <!— —>.  I think I am where I want it to 
>>> be, my comment pattern’s all work as expected, and I used a pList editor, 
>>> but when I save and restart BBEdit it does not appear in the list.
>>> Could anyone help me figure out why it's not loading (guessing I have an 
>>> error). I know I have the pList in the right folder.  I have a github 
>>> started at https://github.com/traisjames/BBEdit-FoldingText because if 
>>> its working I am happy to share my crazy.
>>>
>>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/cb01cb35-3b7e-42f1-a93d-88eab8ae498an%40googlegroups.com.

Reply via email to