<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Fold Margin Style Box Tree]]></title><description><![CDATA[<p dir="auto">is it Possible to Add or Edit the “Fold Margin Style Box Tree”<br />
i wish to Add ‘Sub’ and ‘End Sub’<br />
and Several more.<br />
as you can see the Picture something is wrong.<br />
<img src="/assets/uploads/files/1741873944850-3bfae206-c1f5-4b4d-8126-fc4ce240e7b5-image.png" alt="3bfae206-c1f5-4b4d-8126-fc4ce240e7b5-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26696/fold-margin-style-box-tree</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 22:10:56 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26696.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Mar 2025 13:53:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fold Margin Style Box Tree on Fri, 14 Mar 2025 17:52:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alanrobbo-69" aria-label="Profile: AlanRobbo-69">@<bdi>AlanRobbo-69</bdi></a> said in <a href="/post/100347">Fold Margin Style Box Tree</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a><br />
Yes.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alanrobbo-69" aria-label="Profile: AlanRobbo-69">@<bdi>AlanRobbo-69</bdi></a> is a different username than <a class="plugin-mentions-user plugin-mentions-a" href="/user/francis-robinson" aria-label="Profile: Francis-Robinson">@<bdi>Francis-Robinson</bdi></a> – are you the same person?  If so, please use one account for posting, so the conversation don’t get confused.</p>
<p dir="auto">Alan’s incredulity is that that you seem to think that Fold Margin has no purpose, just because you cannot customize it for built-in languages.  That’s an interpretation that he cannot fathom.  I understand it’s annoying to you, because you found a bug, but if the Lexilla library had properly implemented the right folding rules for VB, you wouldn’t think it needed to be customizable in order to serve a purpose – so I think your “cause - effect” pair of “it’s not customizable - thus, it doesn’t serve a purpose” is fallacious.  You had bad data, so you came to a bad conclusion; it happens.  If you wanted to say at this point, “fold margin <em>for Visual Basic</em> does not serve my needs, because it is currently broken” that’s completely reasonable (but a very different statement than you made).  And my response to such a hypothetical statement would be, “that’s too bad; hopefully ScintillaOrg will fix Lexilla, so that Notepad++ can be updated. too; until then, I guess you won’t be able to fold, unless you cleanly indent your code; sorry.”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100348</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100348</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 14 Mar 2025 17:52:37 GMT</pubDate></item><item><title><![CDATA[Reply to Fold Margin Style Box Tree on Fri, 14 Mar 2025 17:39:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a><br />
Yes.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100347</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100347</guid><dc:creator><![CDATA[AlanRobbo 69]]></dc:creator><pubDate>Fri, 14 Mar 2025 17:39:11 GMT</pubDate></item><item><title><![CDATA[Reply to Fold Margin Style Box Tree on Fri, 14 Mar 2025 13:57:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francis-robinson" aria-label="Profile: Francis-Robinson">@<bdi>Francis-Robinson</bdi></a> said:</p>
<blockquote>
<p dir="auto">[big section of code, without marking it as code]</p>
</blockquote>
<p dir="auto">I had to use moderator power to edit your post to add the ``` lines around your example code, because the forum uses many programming characters for formatting, so it was unreadable.</p>
<p dir="auto">Further, you posted the same post twice (so I deleted one of them), despite the fact that when you posted, the forum gave you a big box:<br />
<img src="/assets/uploads/files/1739033360870-4de2589a-cb56-4156-a027-e96ac4189a9f-image.png" alt="" class=" img-fluid img-markdown" /><br />
… That box explained that until you earn enough upvotes, every post has to go through a “post queue”… and sometimes, it might be a few hours until there is a moderator available to approve a post.  If you don’t see your post right away, just be patient and wait for it to appear.</p>
<blockquote>
<p dir="auto">in conclusion, if the ‘Fold Margin’ cannot be Edited, Added to, then What’s it for?</p>
</blockquote>
<p dir="auto">For built-in programming languages, the “Fold Margin” is for folding code using the definitions of folding that were baked into the syntax highlighter when the library was compiled.  Not all languages use “keywords” for folding, and each language requires separate custom logic to be able to determine where and when to do the folding.</p>
<p dir="auto">And saying “but it should <em>also</em> allow me to add keyword folding” isn’t overly helpful: they would have had to think of that when they were first implementing the folding; and every built-in language would have had to code that additional folding rule separately (because the library uses a different set of functions for each built-in language, because, once again, every language has its own rules).</p>
<p dir="auto">No one has asked the Lexilla project to add custom folding to every language; or, possibly, if someone did request it, their team rejected it. (I haven’t looked through their entire history to know which is the case)</p>
<p dir="auto">That said, they have now been informed that their original choice for code folding in Visual Basic is not sufficient.  It is now up to them to choose whether to implement it, or whether to wait for some volunteer from the wild who has the skill and the interest to completely rewrite the folding for the Visual Basic lexer for their library.</p>
<p dir="auto">And in the mean time, if you want to use code folding in Visual Basic, make sure that you use clean indentation, rather than randomly indenting/outdenting (that’s good coding practice, anyway, regardless of limitations of the tool you are using).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100339</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100339</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 14 Mar 2025 13:57:08 GMT</pubDate></item><item><title><![CDATA[Reply to Fold Margin Style Box Tree on Fri, 14 Mar 2025 13:56:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francis-robinson" aria-label="Profile: Francis-Robinson">@<bdi>Francis-Robinson</bdi></a> said:</p>
<blockquote>
<p dir="auto">if the ‘Fold Margin’ cannot be Edited, Added to, then What’s it for?</p>
</blockquote>
<p dir="auto">Is this a serious question?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100338</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100338</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 14 Mar 2025 13:56:01 GMT</pubDate></item><item><title><![CDATA[Reply to Fold Margin Style Box Tree on Fri, 14 Mar 2025 13:36:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> Thank You.</p>
<p dir="auto">I’m using excel vba exported to “Choose a Book.bas”<br />
in Notepad++ I use “Visual Basic” Language.</p>
<p dir="auto">:-</p>
<pre><code>Sub Get_Selected_File_Properties2()
 
Set HelpBookPath = Workbooks("HelpBook.xlsm").Worksheets("StartSheet")
Set HomeBookPath = Workbooks("Testing Get File Info 09.xlsm").Worksheets("StartSheet")

   'Workbooks("HelpBook.xlsm").Worksheets("StartSheet").Range("k4:k33").Copy
   HelpBookPath.Range("k4:k33").Copy
   
    Workbooks("Testing Get File Info 09.xlsm").Worksheets("sheet1").Range("c4:c33").PasteSpecial Paste:=xlPasteAll
    Range("k1").Select
    
   'Workbooks("Testing Get File Info 09.xlsm").Worksheets("StartSheet").Range("k4:k33").PasteSpecial Paste:=xlPasteAll
   HomeBookPath.Range("k4:k33").PasteSpecial Paste:=xlPasteAll
   
   
   HomeBookPath.Range("a1").Select
'   HomeBookPath.Activate
'   Worksheets("StartSheet").Activate
'   Range("a1").Select

if bill = "aa" Then
	msgbox "if"
end If

End sub
</code></pre>
<p dir="auto">I hope this Helps.<br />
in conclusion, if the ‘Fold Margin’ cannot be Edited, Added to, then What’s it for?</p>
<p dir="auto">PS,  I have created my own Language for ‘CNC Gcode Language’ so I Love Notepad++</p>
<p dir="auto">-–</p>
<p dir="auto"><em>moderator added code markdown around text; please don’t forget to <a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">use the <code>&lt;/&gt;</code> button to mark example text as “code”</a> so that characters don’t get changed by the forum</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/100336</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100336</guid><dc:creator><![CDATA[Francis Robinson]]></dc:creator><pubDate>Fri, 14 Mar 2025 13:36:22 GMT</pubDate></item><item><title><![CDATA[Reply to Fold Margin Style Box Tree on Thu, 13 Mar 2025 16:39:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/francis-robinson" aria-label="Profile: Francis-Robinson">@<bdi>Francis-Robinson</bdi></a> ,</p>
<p dir="auto">Each built-in language defines its own rules for folding in Notepad++ (specifically, in the Lexilla library that Notepad++ uses).  They were not designed in a way that allow their rules to be extended by users (and the Notepad++ developer doesn’t have any influence over the design of Lexilla, so cannot add that feature).</p>
<p dir="auto">The User Defined Languages (UDL) that users create <em>do</em> allow defining <em>keywords</em> for folding, so a pair like <strong>OPEN:</strong> <code>Sub</code> and <strong>CLOSE:</strong> <code>"End Sub"</code> would be doable (the quotes are needed when there is a space in the “keyword”)</p>
<p dir="auto">You haven’t said what language your code is in, though given the style and Workbooks &amp; Range keywords, I am guessing it is Excel VBA, and thus would use the <strong>Visual Basic</strong> language in Notepad++.</p>
<p dir="auto">And while your snippet folding looks wrong, you didn’t give us <s>enough</s> <em>text that we could copy/paste</em> to replicate your problem.  And when I manually type a small snippet with reasonable VBA, it folds correctly.</p>
<p dir="auto">Ah, there, if I replicate your horrendous indentation which the Excel VBA editor would have autocorrected for you,</p>
<pre><code>Sub NameHere()

Set HelpBookP = 5
Set HelpBookP = 5

    if a=b then
        rem xyz
    end if
    Range("K1:K5")
End Sub
</code></pre>
<p dir="auto">Then it renders with weird folding, like:<br />
<img src="/assets/uploads/files/1741874861438-d1317dfd-2870-408d-a510-c46daa7bc4cf-image.png" alt="d1317dfd-2870-408d-a510-c46daa7bc4cf-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Whereas if I properly indent, then it renders the folding reasonably:</p>
<pre><code>Sub NameHere()
    ' here is reasonable
    Set HelpBookP = 5
    Set HelpBookQ = 6
    if a=b then
        rem xyz
    end if
    Range("K1:K5")
End Sub
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1741874977051-944ea26a-d483-4cda-9289-0cf50876ee52-image.png" alt="944ea26a-d483-4cda-9289-0cf50876ee52-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">But if I do something “silly” like add a blank line between the sub and the first command or remark, then it does mess up the rendering of the fold box:<br />
<img src="/assets/uploads/files/1741875183067-bc042402-8c4c-4775-aed6-9ee1694c2968-image.png" alt="bc042402-8c4c-4775-aed6-9ee1694c2968-image.png" class=" img-fluid img-markdown" /><br />
… though if I click on the invisible open-fold on the Sub line, it <em>does</em> allow me to fold:<br />
<img src="/assets/uploads/files/1741875211464-dce820cb-c29e-4cbc-92aa-17cd3a46f50a-image.png" alt="dce820cb-c29e-4cbc-92aa-17cd3a46f50a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Since VBA (unlike Python) doesn’t <em>actually</em> consider whitespace as significant, I agree that the folding logic is wrong.  I will work on confirming using the SciTE editor (which is the testbed “editor” for the Scintilla/Lexilla libraries) – if I can, I will create an issue with the Lexilla folks</p>
<hr />
<p dir="auto"><em>update</em>: confirmed in SciTE, and reported as <a href="https://github.com/ScintillaOrg/lexilla/issues/307" rel="nofollow ugc">issue #307</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/100319</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100319</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 13 Mar 2025 16:39:56 GMT</pubDate></item></channel></rss>