<?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[Question about cursor position]]></title><description><![CDATA[<p dir="auto">Won’t be hard to figure out here, I guess I’d be considered a newbie. I’ve been using notepad++ for many years, but i never really dug in to get it set up the way i want.</p>
<p dir="auto">Using this to write some jQuery functions and I think there’s a way to do this but not sure.</p>
<p dir="auto">The smart editor adds end tags automatically right? so if I type a parenthesis open it automatically closes it. The problem is, it always puts the cursor between the two. more often than not I want the cursor to be after the closing tag. I know this might seem counter intuitive but for me it helps. For instance ‘function(’ would be ‘function()’ but my cursor would be between them. i want it to drop the closing tag before the cursor position</p>
<p dir="auto">Is there a way to configure this? I didn’t see it in the settings.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/11081/question-about-cursor-position</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 23:39:28 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/11081.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 08 Jan 2016 23:48:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Question about cursor position on Sat, 09 Jan 2016 02:36:16 GMT]]></title><description><![CDATA[<p dir="auto">Oh you didn’t spoil anything, you saved me a lot of time. lol i greatly appreciate it</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13124</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13124</guid><dc:creator><![CDATA[John Thompson]]></dc:creator><pubDate>Sat, 09 Jan 2016 02:36:16 GMT</pubDate></item><item><title><![CDATA[Reply to Question about cursor position on Sat, 09 Jan 2016 01:45:55 GMT]]></title><description><![CDATA[<p dir="auto">sorry for spoiling the party ;-)</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13122</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13122</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Sat, 09 Jan 2016 01:45:55 GMT</pubDate></item><item><title><![CDATA[Reply to Question about cursor position on Sat, 09 Jan 2016 01:22:44 GMT]]></title><description><![CDATA[<p dir="auto">Wow i didn’t expect you to write it for me, i figured I could research python a little. i installed the plugin after your reply so i’ll do this in the morning.</p>
<p dir="auto">Thank you SO much!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13121</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13121</guid><dc:creator><![CDATA[John Thompson]]></dc:creator><pubDate>Sat, 09 Jan 2016 01:22:44 GMT</pubDate></item><item><title><![CDATA[Reply to Question about cursor position on Sat, 09 Jan 2016 00:41:47 GMT]]></title><description><![CDATA[<p dir="auto">Hello John-Thompson,</p>
<p dir="auto">what needs to be done first is described <a href="https://notepad-plus-plus.org/community/topic/10882/feature-request-copy-line-with-number/5" rel="nofollow ugc">here</a>.</p>
<p dir="auto">The python script would be</p>
<pre><code>dict_complete_char = {'(':')','{':'}'}

def callback_CHARADDED(args):

    if(args.has_key('ch')):
        if dict_complete_char.get(chr(args['ch'])):
            editor.addText(dict_complete_char.get(chr(args['ch'])))
     
    
editor.clearCallbacks([SCINTILLANOTIFICATION.CHARADDED]);
editor.callback(callback_CHARADDED, [SCINTILLANOTIFICATION.CHARADDED])
</code></pre>
<p dir="auto">As said, disable auto insert by unchecking everything from<br />
<strong>Settings-&gt;Preferences-&gt;Auto-Completion</strong>   -&gt; <strong>Auto-Insert</strong> section<br />
like <a href="http://i.imgur.com/FEUFRkc.png" rel="nofollow ugc">here</a>.</p>
<p dir="auto">Once you saved the script with a meanigful name, restart npp.</p>
<p dir="auto">Open a file and click <strong>Plugins-&gt;PythonScript-&gt;Scripts-&gt;NAME_OF_SCRIPT</strong><br />
now if you type a ( it should automatically add the ) char and the cursor is behind the ) char.</p>
<p dir="auto">Current script supports ( and { chars if you want to add additional pairs you need to modify the line</p>
<pre><code>dict_complete_char = {'(':')','{':'}'}
</code></pre>
<p dir="auto">e.g. you want to have &lt; auto closed as well then you add it like</p>
<pre><code>dict_complete_char = {'(':')','{':'}','&lt;':'&gt;'}
</code></pre>
<p dir="auto">and so on.</p>
<p dir="auto">If you are fine with it and you a tired of running the script everytime you start npp,<br />
we can modify the <a href="http://startup.py" rel="nofollow ugc">startup.py</a>, which is part of the python script pluign installation, to start<br />
this script automatically.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13117</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13117</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Sat, 09 Jan 2016 00:41:47 GMT</pubDate></item><item><title><![CDATA[Reply to Question about cursor position on Sat, 09 Jan 2016 00:12:51 GMT]]></title><description><![CDATA[<p dir="auto">yes that makes sense. I would be happy to do that, unfortunately I know nothing about python. of course I could install the plugin</p>
<p dir="auto">just to explain a little more, I know this sounds counter intuitive, but my problem  is I can’t  seem to teach my brain to know I’m between them, so since I don’t always watch as I type I unconsciously hit the back arrow once when i open a tag. it’s a habit formed from a different editor I used to use that did just what I’m proposing</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13116</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13116</guid><dc:creator><![CDATA[John Thompson]]></dc:creator><pubDate>Sat, 09 Jan 2016 00:12:51 GMT</pubDate></item><item><title><![CDATA[Reply to Question about cursor position on Sat, 09 Jan 2016 00:06:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello John-Thompson,</p>
<p dir="auto">afaik it can’t be configured through settings. What I can propose is a python script solution,<br />
which means you need to install the python script plugin to make this work.<br />
What needs to be done would be</p>
<ul>
<li>disable the autocompletion function from npp</li>
<li>write a script which listens for charadded event , do the completion and put the cursor behind the added char.</li>
</ul>
<p dir="auto">Let me know if you want to go this way.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13115</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13115</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Sat, 09 Jan 2016 00:06:28 GMT</pubDate></item></channel></rss>