<?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[Python Multiline Comment&#x2F;String Folding]]></title><description><![CDATA[<p dir="auto">I seem to be having a problem with the python language and folding when there are multiline comments or strings present.  For instance:</p>
<pre><code>def func():
    str = '''
    
'''
</code></pre>
<p dir="auto">Folding this method will fold up the line defining str = ’ ’ ', but the two lines below it are left unfolded.  If I put something other than spaces on the second line, it will fold the first two lines (assuming the second line doesn’t start with a space).  If I put a space before the trailing ’ ’ ’ it will fold all lines.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13306/python-multiline-comment-string-folding</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 16:06:53 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13306.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Feb 2017 18:43:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python Multiline Comment&#x2F;String Folding on Wed, 22 Feb 2017 00:23:59 GMT]]></title><description><![CDATA[<p dir="auto">Good deal, thanks Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22052</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22052</guid><dc:creator><![CDATA[Jimmy Devine]]></dc:creator><pubDate>Wed, 22 Feb 2017 00:23:59 GMT</pubDate></item><item><title><![CDATA[Reply to Python Multiline Comment&#x2F;String Folding on Tue, 21 Feb 2017 15:56:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/5033">@Jimmy-Devine</a></p>
<p dir="auto">nice finding - thx for sharing this info.</p>
<p dir="auto">For all who don’t want or can’t recompile npp, the same can be achieved when using<br />
python script plugin and the following call</p>
<pre><code>editor.setProperty("fold.quotes.python", 1)
</code></pre>
<p dir="auto">But this needs to be called for every python document once so it makes sense<br />
to call it from within the notepad bufferactivated callback.</p>
<p dir="auto">I have opened a feature request at <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2936" rel="nofollow ugc">github</a> to ask for implementing this.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22047</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22047</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Tue, 21 Feb 2017 15:56:47 GMT</pubDate></item><item><title><![CDATA[Reply to Python Multiline Comment&#x2F;String Folding on Tue, 21 Feb 2017 00:46:34 GMT]]></title><description><![CDATA[<p dir="auto">So messing with the notepad++ code it looks like the scintilla source already present does this, it just isn’t being used, adding this execute line to ScintillaEditView::setPythonLexer adds is</p>
<pre><code>void setPythonLexer() {
	setLexer(SCLEX_PYTHON, L_PYTHON, LIST_0 | LIST_1);
	execute(SCI_SETPROPERTY, reinterpret_cast&lt;WPARAM&gt;("fold.quotes.python"), reinterpret_cast&lt;LPARAM&gt;("1"));
};
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/22037</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22037</guid><dc:creator><![CDATA[Jimmy Devine]]></dc:creator><pubDate>Tue, 21 Feb 2017 00:46:34 GMT</pubDate></item><item><title><![CDATA[Reply to Python Multiline Comment&#x2F;String Folding on Fri, 17 Feb 2017 14:51:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/5033">@Jimmy-Devine</a></p>
<p dir="auto">As the python lexer is part of the scintilla component you might think opening<br />
a feature request at <a href="https://sourceforge.net/p/scintilla/feature-requests/" rel="nofollow ugc">https://sourceforge.net/p/scintilla/feature-requests/</a>.<br />
Maybe search first if not already addressed.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21982</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21982</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 17 Feb 2017 14:51:21 GMT</pubDate></item><item><title><![CDATA[Reply to Python Multiline Comment&#x2F;String Folding on Fri, 17 Feb 2017 14:42:28 GMT]]></title><description><![CDATA[<p dir="auto">Well this isn’t a very good solution because it affects the contents of the multiline string</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21980</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21980</guid><dc:creator><![CDATA[Jimmy Devine]]></dc:creator><pubDate>Fri, 17 Feb 2017 14:42:28 GMT</pubDate></item><item><title><![CDATA[Reply to Python Multiline Comment&#x2F;String Folding on Fri, 17 Feb 2017 14:12:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/5033">@Jimmy-Devine</a></p>
<p dir="auto">python lexer is based on indentation, so yes you have to add spaces in front to make it work correctly.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21976</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21976</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 17 Feb 2017 14:12:41 GMT</pubDate></item></channel></rss>