<?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[Customize Toolbar Plugin and 'Duplicate Current Line' plugin]]></title><description><![CDATA[<p dir="auto">Notepad++ 7.5.9 32-bit<br />
Plugin Manager 1.4.12.0<br />
Customize Toolbar 4.2</p>
<p dir="auto">I’m not entirely sure if this is related to the plugin or not.</p>
<p dir="auto">When I use Edit-&gt;Line Operations-&gt;Duplicate Current Line (a.k.a. ctrl-D) on selected text, it duplicates what I’ve selected, which is what I like.</p>
<p dir="auto">If I use the Duplicate Current Line button that I put on the toolbar with the Customize Toolbar Plugin, it ignores text that I highlighted and instead only duplicates the line the cursor is on.</p>
<p dir="auto">Can the Duplicate Current Line button be made to work with selected text the same way as Edit-&gt;Line Operations-&gt;Duplicate Current Line?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17047/customize-toolbar-plugin-and-duplicate-current-line-plugin</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 14:58:35 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17047.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Feb 2019 03:37:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Thu, 07 Feb 2019 11:49:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<blockquote>
<p dir="auto">But, why you don’t simply use the Ctrl + D shortcut ? It quite faster than clicking on any button, anyway ;-))</p>
</blockquote>
<p dir="auto">👍<br />
i think <a class="plugin-mentions-user plugin-mentions-a" href="/user/taa1" aria-label="Profile: taa1">@<bdi>taa1</bdi></a> thinks the same about that, as we do.<br />
i guess its just: “i don’t need it at all, but now that i’ve found this bug, i somehow i just want it” 😂😉</p>
<hr />
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taa1" aria-label="Profile: taa1">@<bdi>taa1</bdi></a></p>
<p dir="auto">i’ve found a workaround using the built in macro function, together with customized toolbar.</p>
<ul>
<li>
<p dir="auto">first open or create any text file for testing, and select any amount of text<br />
then go to <code>macro &gt; start recording</code><br />
now press <code>ctrl+d</code> to duplicate your selection at the test file<br />
go to <code>macro &gt; stop recording</code><br />
go to <code>macro &gt; save current recorded macro</code> and save it as <code>Duplicate Current Selection</code> (without setting any keyboard shortcut)</p>
</li>
<li>
<p dir="auto">now open your custom button config file, <code>CustomizeToolbar.btn</code>, usually located at: <code>%AppData%\Notepad++\plugins\Config\CustomizeToolbar.btn</code></p>
</li>
<li>
<p dir="auto">add this line at the position you like: <code>Macro,Duplicate Current Selection,,,optional_icon.bmp</code><br />
it should look like the screenshot below<br />
then save CustomizeToolbar.btn</p>
</li>
<li>
<p dir="auto">now restart notepad++ and … tadaaa … here is the button 😃</p>
</li>
</ul>
<p dir="auto"><img src="https://i.imgur.com/MHsHKpe.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<hr />
<p dir="auto">note: you can also execute SCI_SELECTIONDUPLICATE using powerful scripting plugins like pythonscript, but for ctrl+d alone, the macro workaround will be the simplest solution.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39432</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39432</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 07 Feb 2019 11:49:25 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Thu, 07 Feb 2019 11:13:01 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/taa1" aria-label="Profile: taa1">@<bdi>taa1</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I admit that it would be <strong>nice</strong> to find out a way to create a <strong>button</strong>, which simulates the true behavior of the <strong><code>Ctrl + D</code></strong> shortcut of N++, whereas the <strong><code>Edit &gt; Line Operations &gt; Duplicate Current Line</code></strong> just duplicates <strong>current</strong> line, <strong>regardless</strong> of a possible <strong>selection</strong> !</p>
<p dir="auto">But, why you don’t simply use the <strong><code>Ctrl + D</code></strong> shortcut ? It quite <strong>faster</strong> than clicking on any <strong>button</strong>, anyway ;-))</p>
<hr />
<p dir="auto">Personally, I prefer to put, in the <strong>toolbar</strong>, some icons like, for instance, <strong><code>Hide Line Number Margin</code></strong>. Indeed, the menu command <strong><code>View &gt; Hide Line Number Margin</code></strong> ( added by the installation of the <strong>Customize ToolBar</strong> plugin ) <strong>cannot</strong> be mapped to a shortcut ! Hence, the interest of having an <strong>icon</strong> ;-))</p>
<p dir="auto"><strong>Remark</strong> : In order that the <strong><code>Hide Line Number Margin</code></strong> <strong>icon</strong> and the <strong><code>View &gt; Hide Line Number Margin</code></strong> command work properly, you <strong>must</strong> check the <strong><code>Display line number</code></strong> option, in the <strong>Settings &gt; Preferences… &gt; Editing</strong>  tab ;-))</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39430</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39430</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 07 Feb 2019 11:13:01 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Thu, 07 Feb 2019 04:47:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a>,</p>
<p dir="auto">I’ve been searching for a couple of hours for the workaround idea you had, but can’t find a way to link SCI_SELECTIONDUPLICATE to a button. If you find a way, I’d be grateful.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39422</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39422</guid><dc:creator><![CDATA[taa1]]></dc:creator><pubDate>Thu, 07 Feb 2019 04:47:17 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Thu, 07 Feb 2019 03:56:24 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, <a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a>, happy to create a bug report for this – <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5298" rel="nofollow ugc">issue#5298</a>. I zipped the recording and attached the actual file to the github issue because I don’t know how long I’ll keep it on my Google Drive.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39421</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39421</guid><dc:creator><![CDATA[taa1]]></dc:creator><pubDate>Thu, 07 Feb 2019 03:56:24 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Wed, 06 Feb 2019 15:45:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taa1" aria-label="Profile: taa1">@<bdi>taa1</bdi></a></p>
<p dir="auto">my apologies, i forgot to link the “link” from above: <a href="https://notepad-plus-plus.org/community/topic/15741/faq-desk-feature-request-or-bug-report" rel="nofollow ugc">&gt;&gt;&gt; FAQ Desk: Feature Request or Bug Report &lt;&lt;&lt;</a></p>
<p dir="auto">it’s like sending an email and forgetting the attachment (－‸ლ)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39411</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39411</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 06 Feb 2019 15:45:34 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Wed, 06 Feb 2019 11:15:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taa1" aria-label="Profile: taa1">@<bdi>taa1</bdi></a></p>
<p dir="auto">thanks for your video, it loads fine and explains everything.</p>
<p dir="auto">yes, you are correct.<br />
<strong>this is a little notepad++ bug</strong> (a quite funny one) <strong>and here are my test results:</strong></p>
<ul>
<li>
<p dir="auto">ctrl+d is set to the scintilla command <code>SCI_SELECTIONDUPLICATE</code> at the shortcut mapper (default value)<br />
it does <strong>not</strong> trigger the scintilla command <code>SCI_LINEDUPLICATE</code> as it should.<br />
(see screenshot below)</p>
</li>
<li>
<p dir="auto">also the menu <code>edit &gt; line operation &gt; duplicate current line</code> does <strong>not</strong> display the shortcut mapped to <code>SCI_LINEDUPLICATE</code> as it is supposed to, but it shows the shortcut mapped to <code>SCI_SELECTIONDUPLICATE</code>. this can create confusion.</p>
</li>
</ul>
<p dir="auto"><img src="https://i.imgur.com/cxi2bcv.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<hr />
<p dir="auto">i’m still trying to figure out, if it is possible to run <code>SCI_SELECTIONDUPLICATE</code> from a custom toolbar button (as a workaround), so that you can use that button for SCI_SELECTIONDUPLICATE instead of ctrl+d.</p>
<p dir="auto">btw: if you want to file this issue to the developers, please read and follow the community guide for bug reports: &gt;&gt;&gt; FAQ Desk: Feature Request or Bug Report &lt;&lt;&lt; to submit a notepad++ issue at github.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39407</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39407</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 06 Feb 2019 11:15:50 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Wed, 06 Feb 2019 06:40:50 GMT]]></title><description><![CDATA[<p dir="auto">I used the Chrome extension <a href="https://chrome.google.com/webstore/detail/screencastify-screen-vide/mmeijimgabbpbgpdklnllpncmdofkcpn" rel="nofollow ugc">Screencastify</a> to capture this <a href="https://drive.google.com/file/d/1naadpF5xfAn04tvrWykDEoHS5-L8qDIV/view" rel="nofollow ugc">video</a>. I’ve never used Screencastify before but did so in order to demonstrate the issue. You can apparently use the same extension to view it, but I’ve also successfully downloaded the video file and played it with <a href="https://www.videolan.org/vlc/" rel="nofollow ugc">VLC media player</a> so you don’t need Chrome or the extension to view it.</p>
<p dir="auto">I could have sworn that <strong>Edit-&gt;Line Operations-&gt;Duplicate Current Line</strong> did what I described, but now it seems to just be control-d. I was wrong. <strong>Edit-&gt;Line Operations-&gt;Duplicate Current Line</strong> and the customized toolbar button <em>do</em> work the same, but I would like them to work like the control-d keyboard shortcut assigned to <strong>Edit-&gt;Line Operations-&gt;Duplicate Current Line</strong>.</p>
<p dir="auto">You can see in the video that control-d works as I described: it uses the selection and doesn’t act on just a single line.</p>
<p dir="auto">One advantage I like to using control-d is that I <em>don’t</em> lose what is currently in the clipboard.</p>
<p dir="auto">How do I get <strong>Edit-&gt;Line Operations-&gt;Duplicate Current Line</strong> to work like the shortcut key (control-d) that it is assigned to?</p>
<p dir="auto">(Sorry that this ended up being in the Plugin Development cateogory.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39406</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39406</guid><dc:creator><![CDATA[taa1]]></dc:creator><pubDate>Wed, 06 Feb 2019 06:40:50 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Mon, 04 Feb 2019 11:47:00 GMT]]></title><description><![CDATA[<p dir="auto">side note:<br />
the above was tested today on:</p>
<p dir="auto">notepad++ 7.6.3 32-bit<br />
plugins admin (built in)<br />
customize toolbar 4.2</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39335</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39335</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Mon, 04 Feb 2019 11:47:00 GMT</pubDate></item><item><title><![CDATA[Reply to Customize Toolbar Plugin and 'Duplicate Current Line' plugin on Mon, 04 Feb 2019 12:06:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taa1" aria-label="Profile: taa1">@<bdi>taa1</bdi></a></p>
<p dir="auto">this is a normal behaviour.<br />
it behaves the same if used either from the menu or from a customised toolbar.</p>
<p dir="auto">the function <code>Edit-&gt;Line Operations-&gt;Duplicate Current Line</code> only uses the line number where the cursor is currently located as reference (same <code>LN: xx</code>number you see in your status bar at the bottom).</p>
<p dir="auto">there is no need to select any text, as it will not use your selection, but the cursor position at the end of your selection, and it will always duplicate <strong>one single entire line</strong>.</p>
<p dir="auto"><strong>possible explanation for your case:</strong> if you coincidentally have selected a complete line with it’s line feed, then the cursor will be at the beginning of the next line, below the line you have selected, so using “duplicate current line” will now duplicate the line <strong>below</strong> your selected (marked) line.</p>
<p dir="auto">if you want to duplicate a text selection, which can also contain more than one line, then you could, for example, use copy/paste (ctrl-c/ctrl-v).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/39333</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/39333</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Mon, 04 Feb 2019 12:06:04 GMT</pubDate></item></channel></rss>