<?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[Add line break in paste after multi-editing]]></title><description><![CDATA[<p dir="auto">Currently, if one selects multiple strings and then pastes, they are pasted in one long string. It would be more practical if each item was separated by a line break or even better if one could have a setting for their preferred delimiter.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23103/add-line-break-in-paste-after-multi-editing</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 20:19:34 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23103.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Jun 2022 18:53:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sun, 12 Jun 2022 20:33:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@alan-kilborn</a> said in <a href="/post/77512">Add line break in paste after multi-editing</a>:</p>
<blockquote>
<p dir="auto">wait for someone else to try it, and weigh in on how it went for them</p>
</blockquote>
<p dir="auto">I installed the script, selected old text and verified it was in the clipboard by pasting.  Then I selected two or three disjoint sections in multi-select mode, ran the script, and then pasted, and it pasted each section of the new multi-section data with a newline between, so worked exactly as I believe it was described.</p>
<p dir="auto"><img src="https://camo.nodebb.org/e877d36836da6de41d2b3296680278171ddd324f?url=https%3A%2F%2Fi.imgur.com%2FlvPedEa.gif" alt="" class=" img-fluid img-markdown" /></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/8392">@Spiros-Doikas</a> , you should look at <strong>Plugins &gt; Python Script &gt; Show Console</strong> after running the script, and see if it is giving you an error message.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77520</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77520</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 12 Jun 2022 20:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sun, 12 Jun 2022 15:55:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@alan-kilborn</a> Your code may be just fine, and thank you again for that, it could be anything as we have different environments… I tested of course other scripts from the same folder and they do produce results.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77516</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77516</guid><dc:creator><![CDATA[Spiros Doikas]]></dc:creator><pubDate>Sun, 12 Jun 2022 15:55:12 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sun, 12 Jun 2022 11:34:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/8392">@spiros-doikas</a></p>
<p dir="auto">Well, I guess at this point we have to wait for someone else to try it, and weigh in on how it went for them. :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77512</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77512</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 12 Jun 2022 11:34:15 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sun, 12 Jun 2022 08:24:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@alan-kilborn</a> Thank you! I did try the way you described it. But it would not paste the multi-selection items (instead it pastes what was previously in the clipboard).<br />
Please see below</p>
<p dir="auto"><a href="https://ibb.co/gSRGXpH" rel="nofollow ugc">https://ibb.co/gSRGXpH</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77510</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77510</guid><dc:creator><![CDATA[Spiros Doikas]]></dc:creator><pubDate>Sun, 12 Jun 2022 08:24:14 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sat, 11 Jun 2022 23:20:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/8392">@spiros-doikas</a></p>
<p dir="auto">I’m really confused but maybe you are one of those confusing persons we get here occasionally. :-)  I’m not even sure from your most-recent posting if a) you can’t get it to work or b) you got it to work and you are just sharing what you did as part of a victory lap.  I’ll assume a)…</p>
<p dir="auto">If you have “multiple selections active” in step 1 why do you need to “make multi-selections” in step 2?</p>
<p dir="auto">There is no need to press Ctrl+c in your step 2; the script does the copy.</p>
<p dir="auto">Let me show how it should go:</p>
<ol>
<li>
<p dir="auto">Make multiple selections:<br />
<img src="/assets/uploads/files/1654989327349-0fe46eda-9dfc-45b6-bb9b-3d6e96458f05-image.png" alt="0fe46eda-9dfc-45b6-bb9b-3d6e96458f05-image.png" class=" img-fluid img-markdown" /></p>
</li>
<li>
<p dir="auto">Run the script (because you want to copy, with delimiters between the individual items, the currently multi-selected text).</p>
</li>
<li>
<p dir="auto">Paste somewhere to obtain:<br />
<img src="/assets/uploads/files/1654989395996-20e07f9b-217e-4180-b0ed-fd573a408573-image.png" alt="20e07f9b-217e-4180-b0ed-fd573a408573-image.png" class=" img-fluid img-markdown" /></p>
</li>
</ol>
<p dir="auto">Is this not clear?<br />
Anyone? Anyone?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77507</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77507</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 11 Jun 2022 23:20:07 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sat, 11 Jun 2022 19:40:44 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">To use the script you need to have multiple-selections active first, then run the script, then do a paste somewhere (I thought this was obvious?).</p>
</blockquote>
<p dir="auto">This is what I did:</p>
<ol>
<li>multiple-selections active</li>
<li>Make multi-selections and press Ctrl+C</li>
<li>run the script</li>
<li>do a paste somewhere</li>
</ol>
]]></description><link>https://community.notepad-plus-plus.org/post/77503</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77503</guid><dc:creator><![CDATA[Spiros Doikas]]></dc:creator><pubDate>Sat, 11 Jun 2022 19:40:44 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sat, 11 Jun 2022 16:10:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/8392">@spiros-doikas</a> said in <a href="/post/77499">Add line break in paste after multi-editing</a>:</p>
<blockquote>
<p dir="auto">Not sure how to run the script. I tried multi copy first, then running the script via Plugins &gt; Python Script &gt; the actual script but I had no output.</p>
</blockquote>
<p dir="auto">It sounds like you figured out what you needed to do (mostly), but I should have directed you <a href="https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript/1">HERE</a> anyway (sorry).</p>
<p dir="auto">To use the script you need to have multiple-selections active first, then run the script, then do a paste somewhere (I thought this was obvious?).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77500</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77500</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 11 Jun 2022 16:10:22 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Sat, 11 Jun 2022 14:05:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi thanks!</p>
<p dir="auto">Well, in my opinion this is very basic functionality making paste after multi-copy usable in common scenarios (compare similar functionality in MS Word for example).</p>
<p dir="auto">Not sure how to run the script. I tried multi copy first, then running the script via Plugins &gt; Python Script &gt; the actual script but I had no output.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77499</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77499</guid><dc:creator><![CDATA[Spiros Doikas]]></dc:creator><pubDate>Sat, 11 Jun 2022 14:05:13 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Fri, 10 Jun 2022 20:05:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/8392">@spiros-doikas</a> said in <a href="/post/77478">Add line break in paste after multi-editing</a>:</p>
<blockquote>
<p dir="auto">if one selects multiple strings and then pastes, they are pasted in one long string</p>
</blockquote>
<p dir="auto">Don’t you really mean?:</p>
<p dir="auto">“if one selects multiple strings and then copies, then pastes that data somewhere else, they are pasted as one long string”</p>
<p dir="auto">Such behavior is arguably best left to scripting.  Here’s a PythonScript that I call <code>MultiSelectCopyAddDelimiters.py</code> that implements the desired functionality:</p>
<pre><code># -*- coding: utf-8 -*-

#-------------------------------------------------------------------------------

class MSCAD(object):

    def __init__(self):
        preferred_delimiter = '\r\n'
        if editor.getSelections() == 1 or editor.selectionIsRectangle(): return  # not our purview
        sel_text_list = []
        for n in range(editor.getSelections()):
            (s, e) = (editor.getSelectionNStart(n), editor.getSelectionNEnd(n))
            t = editor.getTextRange(s, e)
            sel_text_list.append(t)
        editor.copyText(preferred_delimiter.join(sel_text_list) + '\r\n')

#-------------------------------------------------------------------------------

if __name__ == '__main__': MSCAD()
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/77484</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77484</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 10 Jun 2022 20:05:13 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Fri, 10 Jun 2022 19:37:05 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11781" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11781</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77481</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77481</guid><dc:creator><![CDATA[Spiros Doikas]]></dc:creator><pubDate>Fri, 10 Jun 2022 19:37:05 GMT</pubDate></item><item><title><![CDATA[Reply to Add line break in paste after multi-editing on Fri, 10 Jun 2022 18:54:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/8392">@spiros-doikas</a></p>
<p dir="auto">see <a href="https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report">“FAQ: Feature Request”</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77479</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77479</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 10 Jun 2022 18:54:59 GMT</pubDate></item></channel></rss>