<?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 space at left of text?]]></title><description><![CDATA[<p dir="auto">Hey guys,</p>
<p dir="auto">NP++ is great. Unlike most text editors I’ve used, it starts the text right up against the left border (window edge). Is there a way to add a bit of space there? Maybe it’s just me, but that would make my text easier to read.</p>
<p dir="auto">If this can’t currently be done, will you consider adding it as an option, like how you can specify NP++'s border and cursor widths?</p>
<p dir="auto">And BTW, is it normal for the edit box to scroll off the bottom of the page here, so you can see only a few lines of the text you’re entering? Maybe most of you compose your posts in NP++ and paste them in here (that’s what I’m doing, so I can see it!). But still. It hides the Preview text as well, so I can’t see the point of that either.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/16163/add-space-at-left-of-text</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 00:34:03 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/16163.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 12 Aug 2018 05:53:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Add space at left of text? on Sun, 12 Aug 2018 16:52:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anderwriter" aria-label="Profile: anderwriter">@<bdi>anderwriter</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mikhail-v" aria-label="Profile: mikhail-v">@<bdi>mikhail-v</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dail" aria-label="Profile: dail">@<bdi>dail</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Just tried, <strong>Dail</strong> and it’s working nice !, But you just <strong>forgot</strong> your own excellent <strong>Lua</strong> plugin ;-))</p>
<p dir="auto">So, once the <strong>Lua</strong> plugin installed, just use these commands to change <strong>left</strong> and/or <strong>right</strong> margins :</p>
<p dir="auto"><strong><code>editor.MarginLeft = WidthInPixels</code></strong></p>
<p dir="auto"><strong><code>editor.MarginRight = WidthInPixels</code></strong></p>
<p dir="auto">And to know the <strong>current</strong> value of <strong>margins</strong>, simply type :</p>
<p dir="auto"><strong><code>editor.MarginLeft</code></strong></p>
<p dir="auto"><strong><code>editor.MarginRight</code></strong></p>
<p dir="auto">and hit the <strong><code>Enter</code></strong> key or click on the <strong><code>Run</code></strong> button</p>
<p dir="auto"><strong>Remark</strong> : The default <strong>Scintilla</strong> value, for the <strong>two</strong> margins, is <strong><code>1</code></strong> pixel <strong>wide</strong>, but value <strong><code>0</code></strong> is <strong>allowed</strong>, too !</p>
<p dir="auto">Best Regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/34112</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34112</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 12 Aug 2018 16:52:04 GMT</pubDate></item><item><title><![CDATA[Reply to Add space at left of text? on Sun, 12 Aug 2018 20:59:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mikhail-v" aria-label="Profile: Mikhail-V">@<bdi>Mikhail-V</bdi></a></p>
<p dir="auto">A better way would be the call to <a href="http://npppythonscript.sourceforge.net/docs/latest/scintilla.html#Editor.setMarginLeft" rel="nofollow ugc">setMarginLeft()</a> which does not mess with any of the actual margins and will not interfere with Notepad++'s settings at all.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/34108</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34108</guid><dc:creator><![CDATA[dail]]></dc:creator><pubDate>Sun, 12 Aug 2018 20:59:48 GMT</pubDate></item><item><title><![CDATA[Reply to Add space at left of text? on Sun, 12 Aug 2018 10:59:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anderwriter" aria-label="Profile: Anderwriter">@<bdi>Anderwriter</bdi></a> said:</p>
<blockquote>
<p dir="auto">Unlike most text editors I’ve used, it starts the text right up against the left border (window edge).</p>
</blockquote>
<p dir="auto">Not really, I believe most Npp users at least have line numbers on,<br />
so it is not right from the left border ;-)  See “Settings -&gt; Preferences -&gt; Editing”.<br />
As for other text editors - I think it is very different. MS Notepad for example does not have any margins and no options at all.</p>
<blockquote>
<p dir="auto">Is there a way to add a bit of space there? Maybe it’s just me, but that would make my text easier to read.</p>
</blockquote>
<p dir="auto">It is not just you – solid margin makes it <strong>much easier</strong> to read, but many editors<br />
completely ignore this UX aspect (luckily, Npp is not such a software).</p>
<p dir="auto">So how can it be adjusted? Well, it is not that obvious actually and this question comes<br />
up regularly (I think maybe we need a FAQ section for such things).</p>
<p dir="auto">There are settings for this (and many more settings) - though they cannot be accessed via GUI settings.<br />
The question is, (and its a general question) how to access internal command/settings.<br />
There are few ways, like defining macros, or using specific plugins.</p>
<p dir="auto">For this task, I personally use the Pythonscript plugin.<br />
see downloads:<br />
<a href="https://github.com/bruderstein/PythonScript/releases" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/releases</a><br />
readme:<br />
<a href="http://npppythonscript.sourceforge.net/docs/latest/usage.html#installation" rel="nofollow ugc">http://npppythonscript.sourceforge.net/docs/latest/usage.html#installation</a></p>
<p dir="auto">After installing the plugin, restart Npp, and there will be a menu setting you must check:<br />
open menu “Plugins-&gt; Python Script -&gt; Configuration”.<br />
At the bottom there is “Initialisation” box, choose “ATSTARTUP” there.</p>
<p dir="auto">And there is a script called “<a href="http://startup.py" rel="nofollow ugc">startup.py</a>” - this script will be auto-executed each time Npp restarts.<br />
To edit this script, go to "Plugins-&gt; Python Script -&gt; Scripts -&gt; " and <strong>Ctrl-click</strong> the “<a href="http://startup.py" rel="nofollow ugc">startup.py</a>” item.</p>
<p dir="auto">Now simply add these 3 lines at the bottom of the file and save the file.</p>
<p dir="auto">editor.setMarginWidthN (0, 76)		# line numbers margin<br />
editor.setMarginWidthN (1, 16)		# bookmark margin<br />
editor.setMarginWidthN (3, 46)		# left margin</p>
<p dir="auto"><strong>NOTE</strong>: to make these settings work, you must first <strong>disable</strong> margins in the GUI settings: goto “Settings -&gt; Preferences -&gt; Editing”.<br />
Un-check “display line number” and “display bookmark”<br />
(otherwise there will be conflicts)</p>
<p dir="auto">Now run the script (by clicking it “Plugins-&gt; Python Script -&gt; Scripts -&gt; <a href="http://startup.py" rel="nofollow ugc">startup.py</a>”)<br />
You should see margins changed.<br />
In the above commands, second number in brackets is the pixel-width for each type of<br />
margin. Experiment with these widths to get the comfortable look.</p>
<p dir="auto">The color can be changed in “Settings -&gt; Style configurator”.<br />
Choose “global styles” on the left, then “Line number margin” in second column,<br />
and click “Background color” to change the color.</p>
<blockquote>
<p dir="auto">And BTW, is it normal for the edit box to scroll off the bottom of the page here, so you can see only a few lines of the text you’re entering? Maybe most of you compose your posts in NP++ and paste them in here</p>
</blockquote>
<p dir="auto">Not sure what was the problem, but I think it is always good idea to edit posts<br />
in some editor first and then paste it, not only here but in any web-forms.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/34107</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34107</guid><dc:creator><![CDATA[Mikhail V]]></dc:creator><pubDate>Sun, 12 Aug 2018 10:59:29 GMT</pubDate></item></channel></rss>