<?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[Feature request - Left cursor movement to stop at left margin]]></title><description><![CDATA[<p dir="auto">I find that when moving the cursor left to the beginning of a line with the cursor [&lt;-] left arrow the cursor will wrap to the end of the previous line if I move just one space to far.  It is hard to judge just when to stop.</p>
<p dir="auto">I am aware that I could always use the [home] key for this but when you are editing code close to the beginning of the line and moving around using the cursor keys it is much easier for it to stop on the margin than have to change to the [home] key.</p>
<p dir="auto">There are other text editors that allow this and once you have used it, it becomes really important.<br />
</p><div class="plugin-markdown"><input type="checkbox" checked="true" />or [*].</div><p></p>
<p dir="auto">I have searched for this but can not find it already implemented as a setting or via a plugin.</p>
<p dir="auto">Any help greatly appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13598/feature-request-left-cursor-movement-to-stop-at-left-margin</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 11:04:14 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13598.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Apr 2017 21:57:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Sun, 15 Sep 2019 13:16:43 GMT]]></title><description><![CDATA[<p dir="auto">I wrote a plugin that can be used to configure left cursor movement to stop at left margin. Since this relies on a Scintilla setting you have to use at least Notepad++ v7.7. Untick option <code>Wrap cursor at line start</code>. The plugin’s name is <em>ExtSettings</em>. You can download it <a href="https://sourceforge.net/projects/extsettings/" rel="nofollow ugc">&gt;&gt;&gt; here &lt;&lt;&lt;</a>. It will also be available soon via <em>PluginsAdmin</em>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47148</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47148</guid><dc:creator><![CDATA[dinkumoil]]></dc:creator><pubDate>Sun, 15 Sep 2019 13:16:43 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 09 May 2017 21:40:03 GMT]]></title><description><![CDATA[<p dir="auto"><strong>Simplified script</strong> with console display option.</p>
<p dir="auto">In order to better understand how the script was working and to help debug a couple of quirks I simplified the code by breaking it down to individual steps and then arranged for the values of the variables to be displayed on the console. It has an identical function to the original script used above and can be used as a direct replacement. I have included it here for anyone who may find it helpful.</p>
<p dir="auto"><strong>To display the console</strong> select<br />
Plugins -&gt; Python Script -&gt; ‘Show Console’</p>
<p dir="auto"><strong>The script file itself can be viewed</strong> and edited<br />
Plugins -&gt; Python Script -&gt; [Control] plus left click ‘Stop Left Wrap’</p>
<p dir="auto"><strong>Replace the original script with the following…</strong></p>
<pre><code>n1 = editor.getCurrentPos()                     # Get the position of the cursor from the start of the document
n2 = editor.lineFromPosition(n1)                # Retrieve the line number of the current (n1) position
n3 = editor.positionFromLine(n2)                # Retrieve the position of the start of the current (n2) line
n4 = editor.getSelectionNAnchorVirtualSpace(0)  # Retrieve the number of virtual spaces to the left of the cursor

if n1 != n3: editor.charLeft()                  # if current position is not the start of a line then 'move left'
elif n4 &gt; 0: editor.charLeft()                  # else if the number of virtual spaces to the left of the cursor
                                                # is greater than zero then 'move left'

# The following allows all the variables to be written to the Console
# It doesn't effect the operation of the script and can be deleted or commented out with a '#' if not required

console.write("Variables:\n")
console.write("n1 = %d\n" % n1)
console.write("n2 = %d\n" % n2)
console.write("n3 = %d\n" % n3)
console.write("n4 = %d\n" % n4)
console.write("\n")
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/24150</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24150</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Tue, 09 May 2017 21:40:03 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 02 May 2017 19:08:26 GMT]]></title><description><![CDATA[<p dir="auto">Another correction to the above setup.</p>
<p dir="auto"><strong>Symptom:</strong> When <strong>‘Virtual Space’</strong> mode is enabled the cursor can move left by two places not one as expected.</p>
<p dir="auto">The problem occurs only when ‘Virtual Space’ mode is enabled. ie the ability to move the cursor beyond the end of the line.<br />
This is now quite easy to enable with the Python Plugin installed as it is one of the example scripts which can be activated with an icon in the toolbar.</p>
<p dir="auto">When moving the cursor left within the ‘Virtual Space’ area of a line with existing characters, the cursor moves left by two positions not one as expected.</p>
<p dir="auto">This happens because in this situation both of the conditions in the script for activating a charLeft () are met so it moves twice.<br />
The fix is simple, make the second <strong>‘if’</strong> an <strong>‘elif’</strong> (else if ) so either one of the conditions can activate a charLeft () but not both.</p>
<p dir="auto">The last line of the script now becomes:<br />
<strong>elif editor.getSelectionNAnchorVirtualSpace(0) &gt; 0: editor.charLeft()</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/24039</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24039</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Tue, 02 May 2017 19:08:26 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Thu, 27 Apr 2017 21:16:44 GMT]]></title><description><![CDATA[<p dir="auto">Minor correction to above.</p>
<p dir="auto">The Version of Notepad that the procedure applies to is <strong>V7.3.3</strong> not V3.3.3</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23948</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23948</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Thu, 27 Apr 2017 21:16:44 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Thu, 20 Apr 2017 22:15:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">Thanks Scott, it makes total sense to avoid the conflict and remove the original [left] key Scintilla command 33 response. I have done that and added it to the Install summary.</p>
<p dir="auto">For those that want to implement this Stop Left Wrap function here is a summary of the install process discussed above.<br />
All credits to Scott-Sumner.</p>
<p dir="auto">Version 2 - added remove original [left] move response.<br />
Summary below applies to Notepad++ V3.3.3 (32 bit)</p>
<p dir="auto"><strong>Stop Left Cursor Wrap to previous line:</strong></p>
<p dir="auto"><strong>Install Python Script Plugin</strong></p>
<ul>
<li>Plugins -&gt; Plugin Manager -&gt; Show Plugin Manager -&gt; [Available]</li>
<li>Tick ‘Python Script’ and [install]</li>
</ul>
<p dir="auto"><strong>Write ‘Stop Left Wrap’ Script</strong></p>
<ul>
<li>Plugins -&gt; Python Script -&gt; New Script</li>
<li>Add “Stop Left Wrap” File name for Script and [Save]</li>
<li>This will open a new blank text file page</li>
<li>Copy this Python Script code to the new file and [Save]</li>
</ul>
<p dir="auto">curr_pos = editor.getCurrentPos()<br />
if curr_pos != editor.positionFromLine(editor.lineFromPosition(curr_pos)): editor.charLeft()<br />
if editor.getSelectionNAnchorVirtualSpace(0) &gt; 0: editor.charLeft()</p>
<p dir="auto"><strong>Configure Shortcut</strong></p>
<ul>
<li>Plugins -&gt; Python Script -&gt; Configuration</li>
<li>Select ‘Stop Left Wrap’ and push [Add] to Menu Items and [OK]</li>
</ul>
<p dir="auto"><strong>Attach Shortcut to ‘left’ key</strong></p>
<ul>
<li>Run -&gt; Modify Shortcut/Delete Command -&gt; [Plugin Commands]</li>
<li>scroll down and click select ‘Stop Left Wrap’</li>
<li>select [Modify] and scroll down to Select ‘left’ key</li>
<li>A Conflict warning will appear. Still say [OK]</li>
</ul>
<p dir="auto"><strong>Remove Original ‘left’ key Response</strong></p>
<ul>
<li>Select [Scintilla Commands] tab</li>
<li>scroll down to Highlighted command 33 SCI_CHARLEFT and select</li>
<li>select [Modify] and scroll up to Select ‘none’</li>
<li>select [Apply] to remove original response</li>
<li>select [OK] conflict warning Highlight should now be gone</li>
<li>[Close] Should be operating now, so no more wrap on left margin.</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/23737</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23737</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Thu, 20 Apr 2017 22:15:50 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Thu, 20 Apr 2017 14:51:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">The above is NOT based upon the most current Notepad++ as of this writing (7.3.3) simply because I like to lag a bit behind the bleeding edge (I’m using 7.2.2).  7.3.3 (and possibly slighter earlier) has a “Clear” button (which sounds useful!) but there is some indication that it is buggy; see <a href="https://notepad-plus-plus.org/community/topic/13687/bug-unable-to-clear-or-remove-shortcuts-for-scintilla-commands" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/13687/bug-unable-to-clear-or-remove-shortcuts-for-scintilla-commands</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/23727</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23727</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 20 Apr 2017 14:51:50 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 19 Apr 2017 23:21:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">What it is actually doing (I think) is finding the definition for the Pythonscript tie to the shortcut key FIRST when it is trying to figure out what to do when you press that key.  So, yes, Scintilla command 33 is a “move left” but the key point is that this move left is NEVER HAPPENING because the Pythonscript that runs your new functionality is being run INSTEAD (NOT in addition to!).</p>
<p dir="auto">Conflicts are bad because you can’t predict this “which-will-get-run” behavior, in general.  However, it should always act the same way when a given conflict exists.  So in our example here, the Pythonscript always runs and the Scintilla move-left never does.</p>
<p dir="auto">These are all general conclusions based upon what I’m taking from your experience.  I don’t let conflicts persist in my setup, so I don’t have extensive time studying this and its effects.</p>
<p dir="auto">The best thing to do in your case is to change the shortcut key for Scintilla’s move-left to “None”.  If you bring up the window that allows you to change the key combination for that entry, the dropdown box will have “None” as the first entry at the top.  It would be nicer to not have to select None this way, but rather have a “Remove shortcut” button, but this is not the case.</p>
<p dir="auto">I hope this helps clarify…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23716</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23716</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 19 Apr 2017 23:21:34 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 19 Apr 2017 21:52:04 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the comments Scott. I’ve followed that through and Line 33 of the “Scintilla commands” tab seems to just be activating a move left. I’m not sure how Scintilla responds to the conflict and I may have expected two move lefts but that is not happening so hopefully it is ok.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23711</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23711</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Wed, 19 Apr 2017 21:52:04 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 19 Apr 2017 20:48:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">And to be specific, you’ll find that the conflict you created is almost certainly going to be matched on Line 33 of the “Scintilla commands” tab.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23707</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23707</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 19 Apr 2017 20:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 19 Apr 2017 20:34:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">Well, when you have conflicts, Notepad++'s Shortcut Mapper will turn the conflicts red.  It is just a matter of scrolling through the list until you see the other red one.  Additionally, the box near the bottom (just above the buttons) of the Shortcut Mapper window will show the conflicts for the current item.  I find a quick scroll through looking for the other red one is faster than reading the box and figuring out where to move to, although the text certainly gives you a push in the direction of the correct tab the conflict is on.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23705</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23705</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 19 Apr 2017 20:34:01 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 19 Apr 2017 20:08:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">Fair point. In this case I couldn’t find any way to attach the script to the left key without the ‘Conflict’ warning appearing.<br />
So far it has been ok. I guess the [left] key is only going to be used to move left.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23704</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23704</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Wed, 19 Apr 2017 20:08:12 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 19 Apr 2017 11:51:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">Nice summary of the setup.  I would suggest not letting conflicts persist in the Shortcut Mapper as a “best practice”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23692</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23692</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 19 Apr 2017 11:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 18 Apr 2017 20:19:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">That’s great, a complete fix. Thanks Scott.<br />
So far, no problems with caret-beyond-EOL mode. :)</p>
<p dir="auto">For those that want to implement this Stop Left Wrap function<br />
here is a summary of the install process discussed above.<br />
All credits to Scott-Sumner.</p>
<p dir="auto"><strong>Stop Left Cursor Wrap to previous line:</strong></p>
<p dir="auto"><strong>Install Python Script Plugin</strong></p>
<ul>
<li>Plugins -&gt; Plugin Manager -&gt; Show Plugin Manager -&gt; [Available]</li>
<li>Tick ‘Python Script’ and [install]</li>
</ul>
<p dir="auto"><strong>Write ‘Stop Left Wrap’ Script</strong></p>
<ul>
<li>Plugins -&gt; Python Script -&gt; New Script</li>
<li>Add “Stop Left Wrap” File name for Script and [Save]</li>
<li>This will open a new blank text file page</li>
<li>Copy this Python Script code to the new file and [Save]</li>
</ul>
<p dir="auto">curr_pos = editor.getCurrentPos()<br />
if curr_pos != editor.positionFromLine(editor.lineFromPosition(curr_pos)): editor.charLeft()<br />
if editor.getSelectionNAnchorVirtualSpace(0) &gt; 0: editor.charLeft()</p>
<p dir="auto"><strong>Configure Shortcut</strong></p>
<ul>
<li>Plugins -&gt; Python Script -&gt; Configuration</li>
<li>Select ‘Stop Left Wrap’ and push [Add] to Menu Items and [OK]</li>
</ul>
<p dir="auto"><strong>Attach Shortcut to 'left’key</strong></p>
<ul>
<li>Run -&gt; Modify Shortcut/Delete Command -&gt; [Plugin Commands]</li>
<li>scroll down and click select ‘Stop Left Wrap’</li>
<li>select [Modify] and scroll down to Select ‘left’ Cursor key (if Conflict, still say) [OK]</li>
<li>[Close] Should be operating now, so no more wrap on left margin.</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/23669</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23669</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Tue, 18 Apr 2017 20:19:19 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 18 Apr 2017 17:57:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">Virtual spaces were not considered in the original solution because I rarely turn the caret-beyond-EOL mode on.  I find odd (unexpected) caret movements occur occasionally when I leave it on, although I’d like to have it on 100% of the time.  :(</p>
<p dir="auto">editor.getCurrentPos() only returns 0 when the caret is at the start of document, not at the start of each line.</p>
<p dir="auto">What is needed to fix the original script is a check for virtual space; adding a single line after the other two will do it:</p>
<pre><code>if editor.getSelectionNAnchorVirtualSpace(0) &gt; 0: editor.charLeft()
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/23661</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23661</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Tue, 18 Apr 2017 17:57:41 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Mon, 17 Apr 2017 23:44:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">I have implemented the ‘Stop Left Wrap’ quite successfully apart from one issue which I’m hoping is quite easy to fix.</p>
<p dir="auto">The ‘Stop Wrap’ works ok on lines that have text entered but if you are setup so that your work space includes ‘Virtual Spaces’ or text beyond end of line and the line contains no characters then the left key will not respond. I suspect that it is because the cur_pos value returned by editor.getCurrentPos() is returning zero when the actual cursor position is not zero.</p>
<p dir="auto">I am currently trying to get familiar enough with python in order to fix this but any help would be appreciated?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23647</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23647</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Mon, 17 Apr 2017 23:44:12 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Thu, 13 Apr 2017 00:21:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">As you suggested Scott I installed the “Pythonscript Plugin for Notepad++” saved the script, added a shortcut and mapped it to the left arrow key.</p>
<p dir="auto">It took a while to get there, easy when you know how, but I now have a “Stop left cursor wrap” mapped to my left arrow and it works great.</p>
<p dir="auto">I’m really liking Notepad++ it’s flexibility and support.  Thanks for your help with this Scott.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23557</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23557</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Thu, 13 Apr 2017 00:21:49 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 12 Apr 2017 00:51:32 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>
<p dir="auto">Not an idiot…we all miss things now and again.  It is easy to think of left-arrow functionality as being hardcoded into Notepad++/Scintilla (because who would ever change what it does?), however, it is simply just another reassignable key function in the Shortcut Mapper.  Beauty, eh?</p>
<p dir="auto">But… in theory the Pythonscript could have captured the left arrow keypress (<a class="plugin-mentions-user plugin-mentions-a" href="/user/claudia-frank" aria-label="Profile: Claudia-Frank">@<bdi>Claudia-Frank</bdi></a> has shown us great things here about intercepting keypresses via hooking the message processing loop…), but that would have been too much work, and overkill for this.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23525</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23525</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 12 Apr 2017 00:51:32 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Wed, 12 Apr 2017 00:46:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">Ummm…sorry for the confusion.  This code runs under the “Pythonscript plugin for Notepad++”, not under a standalone Python.  I guess some of the confusion comes because people often talk about “Python scripts” (note the space separating the words) which I personally dislike, because it demeans Python–one should speak of “Python programs” not simply “scripts”.  Over the years I’ve come to respect Python as a full and capable language, not just a “script runner”.</p>
<p dir="auto">Anyway, what you need is to obtain the Pythonscript plugin and get it installed.  Some (most?) people new to this use the version the Plugin Manager installs, but I’ve heard that is problematic; try to find a .msi install package for the PS plugin v1.0.8.0.  If you can’t find it, let me (us) know and I’ll dig up a link to it for you.</p>
<p dir="auto">After that you will need to tie running of my 2-line script to a shortcut key or key-combo.  Eventually you probably want to assign it to left-arrow, but for quick testing I just tied it to ctrl+shift+alt+leftarrow because I currently have that unassigned.  You do this by first going to the “Configuration” choice in the Plugins -&gt; Pythonscript menus, and then “Add” this script.  This will allow the script to be mappable to a key (combo) in the Shortcut Mapper.</p>
<p dir="auto">This all is a bit involved to set up for the first time from scratch, but it does work.  I guess it depends upon how much you want your “don’t allow caret to wrap to previous line” functionality.  :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23524</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23524</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 12 Apr 2017 00:46:08 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 11 Apr 2017 22:26:05 GMT]]></title><description><![CDATA[<p dir="auto">Hi again Scott,</p>
<p dir="auto">I have installed Python and set the Python path.<br />
I verified that Python was working ok by running an example script that worked fine.</p>
<p dir="auto">When I run your script from above…</p>
<p dir="auto">curr_pos = editor.getCurrentPos()<br />
if curr_pos != editor.positionFromLine(editor.lineFromPosition(curr_pos)): editor.charLeft()</p>
<p dir="auto">I get the following error…</p>
<p dir="auto">Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32<br />
Type “copyright”, “credits” or “license()” for more information.</p>
<p dir="auto">========== RESTART: D:\Documents\Arduino\Irridose\Python Script.txt ==========</p>
<p dir="auto">Traceback (most recent call last):<br />
File “D:\Documents\Arduino\Irridose\Python Script.txt”, line 1, in &lt;module&gt;<br />
curr_pos = editor.getCurrentPos()<br />
NameError: name ‘editor’ is not defined</p>
<p dir="auto">Any help or comments on this would be greatly appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23516</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23516</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Tue, 11 Apr 2017 22:26:05 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 11 Apr 2017 21:18:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: scott-sumner">@<bdi>scott-sumner</bdi></a></p>
<p dir="auto">Oh, I’m just <strong>idiot</strong> !! I didn’t realize that your script does <strong>not</strong> catch, of course, the <strong>Scintilla</strong> keyboard actions, related to the <strong>arrow</strong> keys !</p>
<p dir="auto">But, when hitting the <strong>shortcut</strong> of your script, it, rather, performs a Scintilla <strong>SCI_CHARLEFT</strong> function if the <strong>caret</strong> is <strong>not</strong> located, at <strong>column 1</strong> and does <strong>no</strong> action, when caret reaches the <strong>column 1</strong> of the <strong>current</strong> line !</p>
<p dir="auto">And I can <strong>confirm</strong> that, after more that more than <strong>2,000 repeated</strong> shortcut hits, the popup dialog, about “<em>running two <strong>Python</strong> scripts, simultaneously</em>”, occurred less than <strong>five</strong> times. So, <strong>not</strong> a problem, indeed !</p>
<p dir="auto">Best regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23513</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23513</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 11 Apr 2017 21:18:44 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Fri, 28 Apr 2017 01:09:29 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: scott-sumner">@<bdi>scott-sumner</bdi></a></p>
<p dir="auto">Oh, <strong>incredible</strong> ! I’m not able to make your <strong>two</strong>-lines Python script running !! So, either, I’m <strong>wrong</strong> about the purpose of your script or I’m missing something very <strong>obvious</strong> :-((</p>
<p dir="auto">From the <strong>above</strong> posts, I simply thought that, thanks to your script, if you hit, repeatedly, the <strong>left arrow</strong>, the caret would go <strong>backwards</strong> and finally <strong>stops</strong>, while reaching the <strong>beginning</strong> of the <strong>current</strong> line, at <strong>column 1</strong>. Am I right about it ?</p>
<p dir="auto">Quite <strong>curious</strong> to know why it doesn’t work :-) May be, my <strong>Win XP</strong> configuration ?</p>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">Your other script, at the address, below, works <strong>fine</strong> ! So my <strong>Python</strong> installation should <strong>not</strong> be concerned !</p>
<p dir="auto"><a href="https://notepad-plus-plus.org/community/topic/13571/feature-or-plugin-request/10" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/13571/feature-or-plugin-request/10</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/23511</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23511</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 28 Apr 2017 01:09:29 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Tue, 11 Apr 2017 12:11:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">So it is easy enough to implement and test out my theory.  Here’s a Pythonscript two-liner that implements the behavior:</p>
<pre><code>curr_pos = editor.getCurrentPos()
if curr_pos != editor.positionFromLine(editor.lineFromPosition(curr_pos)): editor.charLeft()
</code></pre>
<p dir="auto">Testing it out, I found that for me at least it runs fine even when holding down its shortcut key to move from some large column number back to column 1 (and stop there).  So it turns out I was worried for no reason.  :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23496</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23496</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Tue, 11 Apr 2017 12:11:36 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Mon, 10 Apr 2017 20:12:26 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the comment Scott. I have no plugin development experience and it would appear to be relatively simple to implement. If you or anyone would be happy to give it a go that would be really appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23489</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23489</guid><dc:creator><![CDATA[Rod T]]></dc:creator><pubDate>Mon, 10 Apr 2017 20:12:26 GMT</pubDate></item><item><title><![CDATA[Reply to Feature request - Left cursor movement to stop at left margin on Fri, 07 Apr 2017 12:02:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rod-t" aria-label="Profile: Rod-T">@<bdi>Rod-T</bdi></a></p>
<p dir="auto">This behavior could be implemented with a Pythonscript, but I see a possible problem.  With a PS invoked by a shortcut, if you hold down the key to repeatedly invoke the functionality (i.e., run the script), the PS plugin is apt to popup a “script already running” error window (not the exact text).  I see holding down the left arrow key (the obvious shortcut) to invoke being a very reasonable use-case…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23401</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23401</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Fri, 07 Apr 2017 12:02:29 GMT</pubDate></item></channel></rss>