<?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[Manual-Indent v Auto-Indent v Smart-Indent]]></title><description><![CDATA[<p dir="auto">This is manual-indent keystroke:<br />
&lt;tab&gt; { &lt;enter&gt; &lt;tab&gt; &lt;tab&gt; something &lt;enter&gt; &lt;tab&gt;&lt;tab&gt;something&lt;enter&gt;&lt;tab&gt; }</p>
<p dir="auto">This is auto-indent:<br />
&lt;tab&gt; { &lt;enter&gt;&lt;tab&gt; something &lt;enter&gt;something&lt;enter&gt;&lt;shift-tab&gt; }</p>
<p dir="auto">This is smart-indent:<br />
&lt;tab&gt; { &lt;enter&gt; something &lt;enter&gt; something &lt;enter&gt; }</p>
<p dir="auto">Result:</p>
<pre><code>-&gt;{
-&gt;-&gt;something
-&gt;-&gt;something
-&gt;}|
</code></pre>
<p dir="auto">I want auto-indent, not smart-indent, how?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19050/manual-indent-v-auto-indent-v-smart-indent</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 14:04:53 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19050.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Mar 2020 02:53:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Sat, 13 Jul 2024 12:13:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> said in <a href="/post/95708">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">Not too often mixed within the same file, but from one file to the next, certainly. If it were a menu-accessible, per-tab setting, that wouldn’t be so bad.</p>
</blockquote>
<p dir="auto">There was a proposal recently on the github issues site concerning having the indent settings for the current file shown on the status bar, with the ability to click on it and adjust the settings for the current tab.  Of course I can’t find this now; it may have been part of the discussion in the comments of the issue that is bringing us a three-pronged auto-indent setting.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95744</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95744</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 13 Jul 2024 12:13:04 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Wed, 10 Jul 2024 18:32:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> said in <a href="/post/95707">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">Everyone is different, of course, but for me, the current behavior in this regard is the way I want it.  It sounds like maybe you are often in a situation of mixed tabs/spaces?</p>
</blockquote>
<p dir="auto">Not too often mixed within the same file, but from one file to the next, certainly. If it were a menu-accessible, per-tab setting, that wouldn’t be so bad. But every time a file differs from the previous file you were editing auto-indent “breaks” unless you open the <strong>Settings</strong> dialog, navigate to <strong>Language</strong> (not likely to be the first place an inexperienced user would look for tab-related settings) and change that setting.</p>
<p dir="auto">Just to add to the crazy: If you’re using a language that is not set to use the default indent settings, when you open that dialog, <strong>[Default]</strong> is selected even though it is not in control; so either you look at it and it already says what you want, or you change it and nothing happens, and you’re confused; because you have to know, and remember, to select the <em>active</em> indent settings (which are not identified in any fashion) <em>if</em> those settings (which you don’t see until you select them) are not set to use the default.</p>
<p dir="auto">By the way, <strong>Indent Settings</strong>: <strong>Indent using</strong> also affects what happens when you insert into virtual space in empty lines, and it affects pressing the tab key <em>anywhere</em> in the file (not just in indentation space). You lose the ability to type a tab at all when <strong>Space character(s)</strong> is selected, unless you discover (as I did only a few months ago) that <strong>SCI_TAB</strong> is a Scintilla command to which the Tab key is assigned, and you can clear that in Shortcut Mapper (then the Tab key will always insert a tab character). Until I realized that, I had to leave indentation to use tabs, because I use tab-delimited data often and it was crazy to type a tab and not get a tab. At least I finally found that.</p>
<blockquote>
<p dir="auto">What should it do for smart auto-indent?  What makes up that addition indentation?</p>
<blockquote>
<p dir="auto">scan nearby lines to decide whether to use tabs or spaces</p>
</blockquote>
<p dir="auto">This seems like a problematic thing… what’s “nearby”?, what if nearby lines are not consistent?, …?</p>
</blockquote>
<p dir="auto">That’s the sort of problem doing this in a plug-in first might help to resolve — getting some practical experience before forcing it on everyone.</p>
<p dir="auto">I haven’t seriously started to design this yet, but my thought is that “nearby lines“ means: first the line on which Enter was pressed (e.g., just before the new line), then one after, then one more before, then one more after, until you either hit a reasonable limit, hit both ends of the file, or find a (non-zero-length) line that begins with white space.</p>
<ul>
<li>If no line that begins with white space is found, use the settings.</li>
<li>If the white space is all spaces, then use spaces.</li>
<li>If the white space is all tabs, use tabs.</li>
<li>If the white space is mixed:
<ul>
<li>copy it exactly if the indentation is not changing.</li>
<li>remove the last tab if the indentation is decreasing.</li>
<li>follow the setting if indentation is increasing.</li>
</ul>
</li>
</ul>
<p dir="auto">Of course the whole feature could be turned off for those who prefer the current behavior and find this too unpredictable.</p>
<p dir="auto">Given the discussion in this thread, it seems an option to turn off syntax-aware indenting for any given language (or for all languages), thus making them all behave like plain text with regard to auto-indent, should also be an option.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95708</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95708</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Wed, 10 Jul 2024 18:32:47 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Wed, 10 Jul 2024 11:25:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> said in <a href="/post/95704">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">if all it is doing is matching the indent of the previous line to start the new line, why doesn’t it just copy the characters used to create that indent in the previous line? It will use tabs or spaces depending on what is set in Settings | Preferences… | Language: Indent Settings: Indent using, completely ignoring the context.</p>
</blockquote>
<p dir="auto">Everyone is different, of course, but for me, the current behavior in this regard is the way I want it.  It sounds like maybe you are often in a situation of mixed tabs/spaces?</p>
<blockquote>
<p dir="auto">just copy the characters used to create that indent in the previous line?</p>
</blockquote>
<p dir="auto">This seems reasonable.  At least for auto-indent that places the caret in the same column as the line above (non-smart auto-indent).</p>
<p dir="auto">What should it do for smart auto-indent?  What makes up that addition indentation?  The setting choice from the Settings, or perhaps the tab/spaces just before, as shown below for a couple of cases, where Enter is pressed after <code>foo</code>, smart-indent takes place, and then user directly types <code>bar</code>:</p>
<p dir="auto"><img src="/assets/uploads/files/1720610519690-89796179-2697-40c4-adf6-14c60b9b1b71-image.png" alt="89796179-2697-40c4-adf6-14c60b9b1b71-image.png" class=" img-fluid img-markdown" /></p>
<blockquote>
<p dir="auto">scan nearby lines to decide whether to use tabs or spaces</p>
</blockquote>
<p dir="auto">This seems like a problematic thing… what’s “nearby”?, what if nearby lines are not consistent?, …?  This hints at <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a>’s point about needing “tons of options to configure”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95707</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95707</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 10 Jul 2024 11:25:17 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Wed, 10 Jul 2024 02:30:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> said in <a href="/post/95701">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">Python is much simpler, in this regard, and Notepad++ should benefit from having smart indent with it.</p>
</blockquote>
<p dir="auto">Agreed. Should I <strong>ever</strong> think about trying to program in Python, having that little smart indent working according to Python’s quirk of requiring it, would greatly facilitate someone <strong>not</strong> versed in using specific indentations to make a program work based on those indentations.  At present, it is one of the main reasons I only use those learn Python apps…and never go past it. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95705</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95705</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 10 Jul 2024 02:30:32 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Tue, 09 Jul 2024 22:18:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> said in <a href="/post/95701">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">This is seemingly very true for C-like languages, although I don’t recall too many complaints with what Notepad++ does in this regard.</p>
</blockquote>
<p dir="auto">What drives me up a tree is what happens with plain text files (though it can affect languages, too).</p>
<p dir="auto">In plain text, if you have auto-indent enabled, and you press enter at the end of a line that begins with white space, the next line is indented to match. That can save a lot of typing… except…</p>
<p dir="auto">FFS, if all it is doing is matching the indent of the previous line to start the new line, <em>why doesn’t it just copy the characters used to create that indent</em> in the previous line? It will use tabs or spaces depending on what is set in <strong>Settings</strong> | <strong>Preferences…</strong> | <strong>Language</strong>: <strong>Indent Settings</strong>: <strong>Indent using</strong>, completely ignoring the context.</p>
<p dir="auto">Well, I know why… because it uses <a href="https://www.scintilla.org/ScintillaDoc.html#SCI_SETLINEINDENTATION" rel="nofollow ugc">SCI_SETLINEINDENTATION</a> to accomplish the indentation… but it is really annoying.</p>
<p dir="auto">I have it on my mental list either to add to my plugin, or to create a separate plugin, to change this behavior so it will just copy the previous line when the indentation is not changing, and when creating new indentation (in files that have a language definition), scan nearby lines to decide whether to use tabs or spaces. If it works, it could serve as a model for a request to make Notepad++ behave that way. If I get to work on that one day, I will certainly review this thread to see what other options might make sense.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95704</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95704</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Tue, 09 Jul 2024 22:18:45 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Tue, 09 Jul 2024 19:11:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a> said in <a href="/post/95700">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">And they will hardly ever be satisfied since each user has a slightly different view of the right style that the smart indent should follow.</p>
</blockquote>
<p dir="auto">This is seemingly very true for C-like languages, although I don’t recall too many complaints with what Notepad++ does in this regard.</p>
<p dir="auto">Python is much simpler, in this regard, and Notepad++ should benefit from having smart indent with it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95701</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95701</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 09 Jul 2024 19:11:04 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Tue, 09 Jul 2024 18:21:28 GMT]]></title><description><![CDATA[<p dir="auto">This “smart indent” as only option was a really poor choice.<br />
Continuing the trend of granting “random” user requests without thinking about product coherency.</p>
<p dir="auto">The good thing about <strong>block indent</strong> is that it is simple and completely predictable.<br />
Users experience with it for 2 minutes and from that point know exactly what the behavior will be.</p>
<p dir="auto">Smart indent is unpredictable. Users will never know what to expect until they experienced ALL the syntax combinations that were programmed into it. And they will hardly ever be satisfied since each user has a slightly different view of the right style that the smart indent should follow. Products that focus on smart indent (and auto code “beautifiers”) tend to give users ton of options to configure.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95700</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95700</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Tue, 09 Jul 2024 18:21:28 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Wed, 03 Jul 2024 22:17:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a> said in <a href="/post/51476">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">Didn’t know NP++ has smart indent.</p>
</blockquote>
<p dir="auto">N++ has smart-indent for certain languages (mainly the C family, and in 8.6.8 it has been added for Python).  If auto-indent is on, then you get smart-indent for languages that “have the smarts”.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/agung-sukma" aria-label="Profile: Agung-Sukma">@<bdi>Agung-Sukma</bdi></a> said in <a href="/post/51402">Manual-Indent v Auto-Indent v Smart-Indent</a>:</p>
<blockquote>
<p dir="auto">I want auto-indent, not smart-indent, how?</p>
</blockquote>
<p dir="auto">There is currently no way to achieve this.<br />
See discussion comments in <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15396" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15396</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95652</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95652</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 03 Jul 2024 22:17:16 GMT</pubDate></item><item><title><![CDATA[Reply to Manual-Indent v Auto-Indent v Smart-Indent on Tue, 17 Mar 2020 23:05:41 GMT]]></title><description><![CDATA[<p dir="auto">Didn’t know NP++ has smart indent. Smart indent is rather language specific.<br />
Maybe it is a new feature but are you sure it is not some plugin that adds this “smartness”?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/51476</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/51476</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Tue, 17 Mar 2020 23:05:41 GMT</pubDate></item></channel></rss>