<?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[Tabs to spaces]]></title><description><![CDATA[<p dir="auto">Hi.<br />
For a long time, I used single spaces as indent in my files.<br />
Now I decided to use tabs instead.<br />
But I’ve got a problem: when I use “Space to TAB” menu item, Notepad++ only replaces spaces starting from second space in each line. First space in every line is left untouched, even though size of tab is set to “1”.</p>
<p dir="auto">Screenshots:<br />
<a href="http://s018.radikal.ru/i514/1605/1b/d28b37060914.png" rel="nofollow ugc">http://s018.radikal.ru/i514/1605/1b/d28b37060914.png</a><br />
<a href="http://s019.radikal.ru/i621/1605/b4/152d0a97d0d7.png" rel="nofollow ugc">http://s019.radikal.ru/i621/1605/b4/152d0a97d0d7.png</a><br />
<a href="http://s020.radikal.ru/i704/1605/2a/3f6645c8b9dc.png" rel="nofollow ugc">http://s020.radikal.ru/i704/1605/2a/3f6645c8b9dc.png</a></p>
<p dir="auto">This is not what I want. Why Notepad is acting this way? What should I do to replace each and every space character in the beginning of every line to tab?</p>
<p dir="auto">P.S. Sorry for my English, I’m not a native speaker…</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/11885/tabs-to-spaces</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 17:10:05 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/11885.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 May 2016 11:51:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tabs to spaces on Mon, 06 Mar 2023 07:05:32 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/the-fartman" aria-label="Profile: the-fartman">@<bdi>the-fartman</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I realize that I made some <strong>syntax</strong> errors in the <strong>last</strong> part of my <strong>last</strong> and very <strong>old</strong> post ( After the <strong>P.S.</strong> indication )</p>
<p dir="auto">So, here is the <strong>updated</strong> version :</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">Here is, below, a <strong>mRNA</strong> sequence, translated into <strong>proteins</strong>, by a <strong>ribosome</strong> of a living cell ( found somewhere, in a <strong>regex</strong> documentation, to explain the <strong>interest</strong> of the <strong><code>\G</code></strong> <strong>regex</strong> feature ! ) :</p>
<pre><code>....AUGGGUCGACUGGUUCUCGAAGGUUUCAAAGGUUCAAGGGUCCGGUAUUCAGUCGUCCGCUCUACUGGUACAAAGGGGGUACCACGACUGGUUCUCGAAUAG
</code></pre>
<p dir="auto">If we take off the <strong>start</strong> codon <strong><code>AUG</code></strong> and its <strong>leading nearby</strong> sequences, as well as the <strong>stop</strong> codon <strong><code>UAG</code></strong>, we, now, obtain the sequence :</p>
<pre><code>GGUCGACUGGUUCUCGAAGGUUUCAAAGGUUCAAGGGUCCGGUAUUCAGUCGUCCGCUCUACUGGUACAAAGGGGGUACCACGACUGGUUCUCGAA
¯¯¯     ¨¨¨       ¯¯¯      ¯¯¯     ¨¨¨  ¨¨¨                    ¯¯¯        ¨¨¨         ¨¨¨
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
</code></pre>
<p dir="auto">In that <strong><code>RNA</code></strong> sequence, let’s consider the <strong>amino-acid</strong> sequence <strong>GGU</strong>. You remark, easily, that :</p>
<ul>
<li>
<p dir="auto">At positions <strong>1</strong>, <strong>19</strong>, <strong>28</strong> and <strong>64</strong>, this sequence is a <strong>TRUE</strong> codon</p>
</li>
<li>
<p dir="auto">At positions <strong>9</strong>, <strong>36</strong>, <strong>41</strong>, <strong>75</strong> and <strong>87</strong>, this sequence is <strong>NOT</strong> a codon</p>
</li>
</ul>
<p dir="auto">Now :</p>
<ul>
<li>
<p dir="auto">Place the cursor <strong>right before</strong> the <strong>RNA</strong> sequence <strong>GGUCGA…</strong> ( <strong><code>IMPORTANT</code></strong>)</p>
</li>
<li>
<p dir="auto">To understand the effect of the <strong><code>\G</code></strong> feature, try, <strong>successively</strong>, the <strong><code>3</code></strong> regexes, below :</p>
</li>
</ul>
<pre><code class="language-diff">    .*?GGU           which matches the SHORTEST range of characters, till an amino-acid sequence GGU
    
    (\u\u\u)*?GGU    which matches the SHORTEST range of TRIPLETS,   till an amino-acid sequence GGU
    
    \G(\u\u\u)*?GGU  which matches the SHORTEST range of CODONS,     till a GGU codon
</code></pre>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong>first</strong> regex matches <strong>any</strong> range of <strong>capital</strong> letters, whatever its <strong>size</strong>, followed with the <strong>first</strong> string <strong>GGU</strong></p>
</li>
<li>
<p dir="auto">The <strong>second</strong> regex matches <strong>any</strong> range, containing <strong><code>3*n</code></strong> <strong>capital</strong> letters, followed with the <strong>first</strong> string <strong>GGU</strong> ( <strong><code>n &gt;= 0</code></strong> )</p>
</li>
<li>
<p dir="auto">The <strong>third</strong> regex matches <strong>any</strong> range, containing <strong><code>3*n</code></strong> <strong>capital</strong> letters, followed with the <strong>first</strong> string <strong>GGU</strong>, separated, from the <strong>beginning</strong>, by <strong><code>3*m</code></strong> <strong>capital</strong> letters, so the <strong>GGU</strong> sequence is a <strong>codon</strong> ( <strong><code>n</code></strong> and <strong><code>m &gt;= 0</code></strong> )</p>
</li>
</ul>
<p dir="auto">Similarly, try these <strong><code>3</code></strong> regexes below :</p>
<pre><code class="language-diff">    .*GGU            which matches the LONGEST range of characters, till an amino-acid sequence GGU
    
    (\u\u\u)*GGU     which matches the LONGEST range of TRIPLETS,   till an amino-acid sequence GGU
    
    \G(\u\u\u)*GGU   which matches the LONGEST range of CODONS,     till a GGU codon
</code></pre>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong>first</strong> regex matches <strong>any</strong> range of <strong>capital</strong> letters, whatever its <strong>size</strong>, followed with the <strong>last</strong> string <strong>GGU</strong></p>
</li>
<li>
<p dir="auto">The <strong>second</strong> regex matches <strong>any</strong> range, containing <strong><code>3*n</code></strong> <strong>capital</strong> letters, followed with a <strong>last</strong> string <strong>GGU</strong> ( <strong><code>n &gt;= 0</code></strong> )</p>
</li>
<li>
<p dir="auto">The <strong>third</strong> regex matches <strong>any</strong> range, containing <strong><code>3*n</code></strong> <strong>capital</strong> letters, followed with the <strong>last</strong> string <strong>GGU</strong>, separated, from the <strong>beginning</strong>, by <strong><code>3*m</code></strong> <strong>capital</strong> letters, so the <strong>GGU</strong> sequence is a <strong>codon</strong> ( <strong><code>n</code></strong> and <strong><code>m &gt;= 0</code></strong> )</p>
</li>
</ul>
<p dir="auto">For <strong>further</strong> information, on that topic, refer to the links, below :</p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Codon" rel="nofollow ugc">https://en.wikipedia.org/wiki/Codon</a></p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Start_codon" rel="nofollow ugc">https://en.wikipedia.org/wiki/Start_codon</a></p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Stop_codon" rel="nofollow ugc">https://en.wikipedia.org/wiki/Stop_codon</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/84603</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84603</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 06 Mar 2023 07:05:32 GMT</pubDate></item><item><title><![CDATA[Reply to Tabs to spaces on Tue, 07 Jun 2016 18:04:49 GMT]]></title><description><![CDATA[<p dir="auto">Hi, guy038,</p>
<blockquote>
<p dir="auto">I’m afraid there’s no solution, unless the developer, that implemented the TAB to Space and the Space to TAB… features, would give a glance to his code ! So, in the meanwhile, the only way seems to create a specific S/R, as you did :-)</p>
</blockquote>
<p dir="auto">Yeah, but the question is: does this thread work as bug-report? I assume this is an official Notepad++ forum, and developers keep an eye on it, so behavior of “Spaces to TABS” menu item will be fixed in next release… or not?</p>
<blockquote>
<p dir="auto">However, I think that we would better to search for any horizontal blank character and shorten your search regex ^ |\G(?!^) as (^|\G)\h. Indeed, this new regex would allow to change lines which contain, both, leading tabs and leading spaces ! So, we obtain the S/R :<br />
Find what (^|\G)\h<br />
Replace with \t</p>
</blockquote>
<p dir="auto">Thanx, that’s much better regexp, shorten and clear. Macro is nice too.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/16276</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16276</guid><dc:creator><![CDATA[The Fartman]]></dc:creator><pubDate>Tue, 07 Jun 2016 18:04:49 GMT</pubDate></item><item><title><![CDATA[Reply to Tabs to spaces on Sat, 04 Jun 2016 20:41:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <strong>The Fartman</strong>,</p>
<p dir="auto">Sorry for my <strong>late</strong> reply, but we had a <strong>hard</strong> week , at work !</p>
<p dir="auto">I’m afraid there’s no solution, unless the developer, that implemented the <strong>TAB to Space</strong> and the <strong>Space to TAB…</strong> features, would give a glance to his code ! So, in the meanwhile, the only way seems to create a <strong>specific</strong> S/R, as you did :-)</p>
<p dir="auto">By the way, to <strong>restrict</strong> the replacement to the <strong>leading</strong> spaces, you have found a very <strong>clever</strong> regex !! Indeed, the syntax <strong><code>\G</code></strong> is <strong>rarely</strong> used, but can be very <strong>interesting</strong> in some cases ! In <strong>post-scriptum</strong>, at the <strong>end</strong> of that post, I describe a use of the <strong><code>\G</code></strong> syntax, to detect a range of <strong>true codons</strong>, in an <strong>RNA</strong> sequence :-))</p>
<hr />
<p dir="auto">For the record, the <strong><code>\G</code></strong> form is an <strong>assertion</strong>, which represents any of <strong>3 locations</strong>, below :</p>
<ul>
<li>The <strong>very beginning</strong> of a file</li>
<li>The location of cursor after the <strong>previous</strong> match of the regex engine</li>
<li>The location of cursor, <strong>previously moved</strong>, on purpose, by the user</li>
</ul>
<p dir="auto">However, I think that we would better to search for any <strong>horizontal blank</strong> character and shorten your <strong>search</strong> regex <strong><code>^ |\G(?!^) </code></strong> as <strong><code>(^|\G)\h</code></strong>. Indeed, this <strong>new</strong> regex would allow to change lines which contain, both, <strong>leading tabs</strong> and <strong>leading spaces</strong> ! So, we obtain the S/R :</p>
<p dir="auto">Find what <strong><code>(^|\G)\h</code></strong></p>
<p dir="auto">Replace with <strong><code>\t</code></strong></p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">This S/R, matches the <strong>first blank</strong> character, at the <strong>beginning</strong> of a line and change it into a <strong>tabulation</strong></p>
</li>
<li>
<p dir="auto">Then, it matches the <strong>next blank</strong> character and change it, again, in a <strong>tabulation</strong></p>
</li>
<li>
<p dir="auto">As soon as the <strong>next blank</strong> character is <strong>NOT</strong> closed to the <strong>previous</strong> one, ( because of some <strong>non-blank</strong> characters ), the replace process is <strong>stopped</strong>, due to the <strong><code>\G</code></strong> syntax</p>
</li>
<li>
<p dir="auto">Then, on matching the <strong>first blank</strong> character, of the <strong>second</strong> line, the S/R process is <strong>re-started</strong>, and so on…</p>
</li>
</ul>
<p dir="auto">Finally, this S/R <strong>only</strong> change any <strong>leading blank</strong> character into a <strong>tabulation</strong> character</p>
<hr />
<p dir="auto">It took me a <strong>long</strong> time to find out an <strong>equivalent</strong> regex, which does <strong>NOT</strong> use the <strong>\G</strong> syntax. But, as you can see, this regex, below, is not so <strong>elegant</strong> as our <strong>previous</strong> regex !</p>
<p dir="auto">Find what : <strong><code>(\h)|[^\h\r\n].*</code></strong></p>
<p dir="auto">Replace with : <strong><code>(?1\t:$0)</code></strong></p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">As long as a <strong>blank</strong> character <strong><code>(\h)</code></strong> is matched , it is replaced with a <strong>tabulation</strong> character ( <strong>group 1</strong> exists )</p>
</li>
<li>
<p dir="auto">As soon as a <strong>non-blank</strong> character is detected, the regex matches all the <strong>rest</strong> of the <strong>current</strong> line <strong><code>[^\h\r\n].*</code></strong> and rewrites the <strong>entire</strong> match <strong><code>$0</code></strong> ( <strong>group 1</strong> does <strong>NOT</strong> exist )</p>
</li>
<li>
<p dir="auto">Again, <strong>next</strong> line, the process <strong>re-starts</strong> and tries to match possible <strong>blank</strong> characters, <strong>first</strong> , and so on !</p>
</li>
</ul>
<hr />
<p dir="auto">An <strong>improvement</strong> could be to record a <strong>macro</strong> for that specific S/R.</p>
<p dir="auto">You may, either, add the following lines in your <strong>shortcuts.xml</strong> configuration file, with an <strong><code>OTHER</code></strong> editor than N++ and, then, <strong>re-open</strong> Notepad++. I chose the <strong>Alt + Ctrl + Shift + T</strong> shortcut, for (<strong>T</strong>)ab, but you may change it, as you like !</p>
<pre><code>&lt;Macro name="S2T" Ctrl="yes" Alt="yes" Shift="yes" Key="84"&gt;
    &lt;Action type="0" message="2316" wParam="0" lParam="0" sParam="" /&gt;
    &lt;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
    &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="(^|\G)\h" /&gt;
    &lt;Action type="3" message="1625" wParam="0" lParam="2" sParam="" /&gt;
    &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="\t" /&gt;
    &lt;Action type="3" message="1702" wParam="0" lParam="512" sParam="" /&gt;
    &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
&lt;/Macro&gt;
</code></pre>
<p dir="auto">Here is a <strong>short</strong> explanation :</p>
<ul>
<li>Message “<strong>2316</strong>” move the cursor at the <strong>very beginning</strong> of the <strong>current</strong> file</li>
<li>Message “<strong>1700</strong>” <strong>initialize</strong> the search/replacement process</li>
<li>Message “<strong>1601</strong>” contains the <strong>search</strong> pattern</li>
<li>Message “<strong>1625</strong>” select the <strong>search mode</strong></li>
<li>Message “<strong>1602</strong>” contains the <strong>replacement</strong> pattern</li>
<li>Message “<strong>1702</strong>” represents the <strong>sum</strong> of the <strong>search options</strong></li>
<li>Message “<strong>1701</strong>” represents the search/replacement <strong>command code</strong> to execute</li>
</ul>
<p dir="auto">Refers to the documentation, below, for a <strong>detailed</strong> information :</p>
<p dir="auto"><a href="http://docs.notepad-plus-plus.org/index.php/Editing_Configuration_Files#Search_.2F_Replace_encoding" rel="nofollow ugc">http://docs.notepad-plus-plus.org/index.php/Editing_Configuration_Files#Search_.2F_Replace_encoding</a></p>
<p dir="auto"><strong>Note</strong> : In documentation, the meaning of flag value <strong>512</strong>, when the message = “<strong>1702</strong>”, is <strong>wrong</strong> ! The correct meaning is <strong>Search goes downwards</strong> !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">Here is, below, a <strong>mRNA</strong> sequence, translated into <strong>proteins</strong>, by a <strong>ribosome</strong> of a living cell ( found somewhere, in a <strong>regex</strong> documentation, to explain the <strong>interest</strong> of the <strong><code>\G</code></strong> feature ! ) :</p>
<pre><code>....AUGGGUCGACUGGUUCUCGAAGGUUUCAAAGGUUCAAGGGUCCGGUAUUCAGUCGUCCGCUCUACUGGUACAAAGGGGGUACCACGACUGGUUCUCGAAUAG
</code></pre>
<p dir="auto">If we take off the <strong>start</strong> codon <strong><code>AUG</code></strong> and its <strong>leading nearby</strong> sequences, as well as the <strong>stop</strong> codon <strong><code>UAG</code></strong>, we, now, obtain the sequence :</p>
<pre><code>GGUCGACUGGUUCUCGAAGGUUUCAAAGGUUCAAGGGUCCGGUAUUCAGUCGUCCGCUCUACUGGUACAAAGGGGGUACCACGACUGGUUCUCGAA
¯¯¯     ¨¨¨       ¯¯¯      ¯¯¯     ¨¨¨  ¨¨¨                    ¯¯¯        ¨¨¨         ¨¨¨
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
</code></pre>
<p dir="auto">In that <strong>RNA</strong> sequence, let’s consider the <strong>amino-acid</strong> sequence <strong>GGU</strong>. You remark, easily, that :</p>
<ul>
<li>
<p dir="auto">At positions <strong>1</strong>, <strong>19</strong>, <strong>28</strong> and <strong>64</strong>, this sequence is a <strong>TRUE</strong> codon</p>
</li>
<li>
<p dir="auto">At positions <strong>9</strong>, <strong>36</strong>, <strong>41</strong>, <strong>75</strong> and <strong>87</strong>, this sequence is <strong>NOT</strong> a codon</p>
</li>
</ul>
<p dir="auto">Now :</p>
<ul>
<li>
<p dir="auto">Place the cursor <strong>just before</strong> the <strong>RNA</strong> sequence <strong>GGUCGA…</strong> ( <strong><code>IMPORTANT</code></strong>)</p>
</li>
<li>
<p dir="auto">To understand the effect of the <strong><code>\G</code></strong> feature, try, <strong>successively</strong>, the different regexes, below</p>
<p dir="auto">.*?GGU           which matches the SHORTEST range of characters, till an amino-acid sequence GGU</p>
<p dir="auto">(\u\u\u)*?GGU    which matches the SHORTEST range of TRIPLETS,   till an amino-acid sequence GGU</p>
<p dir="auto">\G(\u\u\u)*?GGU  which matches the SHORTEST range of CODONS,     till a GGU codon</p>
</li>
</ul>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong>first</strong> regex matches <strong>any</strong> range of <strong>capital</strong> letters, whatever its <strong>size</strong>, followed with a string <strong>GGU</strong></p>
</li>
<li>
<p dir="auto">The <strong>second</strong> regex matches <strong>any</strong> range, containing <strong><code>3*n</code></strong> <strong>capital</strong> letters, followed with a string <strong>GGU</strong> ( <strong>n &gt;= 0</strong> )</p>
</li>
<li>
<p dir="auto">The <strong>third</strong> regex matches <strong>any</strong> range, containing <strong><code>3*n</code></strong> <strong>capital</strong> letters, followed with a string <strong>GGU</strong>, separated, from the <strong>beginning</strong>, by <strong><code>3*m</code></strong> <strong>capital</strong> letters, so the <strong>GGU</strong> sequence is a <strong>codon</strong> ( <strong>n</strong> and <strong>m &gt;= 0</strong> )</p>
</li>
</ul>
<p dir="auto">Similarly :</p>
<pre><code>.*GGU          which matches the LONGEST range of characters, till an amino-acid sequence GGU

(\u\u\u)*GGU   which matches the LONGEST range of TRIPLETS,   till an amino-acid sequence GGU

\G(\u\u\u)*GGU which matches the LONGEST range of CODONS,     till a GGU codon
</code></pre>
<p dir="auto"><code> </code><br />
For <strong>further</strong> information, on that topic, refer to the links, below :</p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Codon" rel="nofollow ugc">https://en.wikipedia.org/wiki/Codon</a></p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Start_codon" rel="nofollow ugc">https://en.wikipedia.org/wiki/Start_codon</a></p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Stop_codon" rel="nofollow ugc">https://en.wikipedia.org/wiki/Stop_codon</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/16220</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16220</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 04 Jun 2016 20:41:35 GMT</pubDate></item><item><title><![CDATA[Reply to Tabs to spaces on Wed, 01 Jun 2016 14:58:43 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">But, if you set the tabulation size T to the value 1 and that you select one of the two options Space to TAB …, the arrangement of text is kept by adding any range of tabulations, of one-character long, systematically followed by a last space character ! It looks like a (small) bug :-((</p>
</blockquote>
<p dir="auto">Yeah, and that really bugs me out. Looks like that feature which was supposed to allow users to migrate from spaces indentation to tabs indentation doesn’t work :(<br />
If it’s actually a bug, I’m looking forward that it will be fixed in next release.</p>
<blockquote>
<p dir="auto">By the way, could you explain to me about the real interest in changing any space by a tabulation of one-character long ?</p>
</blockquote>
<p dir="auto">Not sure about your question, but I guess you’re referring to my screenshot where I picked “Space to TAB (All)” instead of “Space to TAB (Leading)”, but in fact, I did it only because “… Leading” menu item didn’t work too, so I just demonstrate that even “… All” doesn’t perform expected actions as well.</p>
<p dir="auto">Anyway, I just want to change indentation of my code (not replace every space with tab, indeed): for years I was using single space, and now I want to use tab, and I want Notepad++ to do it for me. Manually re-indent thousands of lines would a little exhausting.</p>
<p dir="auto">For now, I use this regular expression: find "^ |\G(?!^) ", replace with “\t” to change indentation, but having that menu item fixed would be better.</p>
<p dir="auto">P.S.: This thread should be called “Spaces to tabs” indeed, I mistyped.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/16174</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16174</guid><dc:creator><![CDATA[The Fartman]]></dc:creator><pubDate>Wed, 01 Jun 2016 14:58:43 GMT</pubDate></item><item><title><![CDATA[Reply to Tabs to spaces on Tue, 31 May 2016 22:01:15 GMT]]></title><description><![CDATA[<p dir="auto">Hello <strong>The Fartman</strong>,</p>
<p dir="auto">Ah, yes ! You’re <strong>right</strong> about it ! If you set in <strong>Settings - Preferences - Tab Settings</strong>, for a <strong>given</strong> language,  the <strong>default width</strong> of a <strong>tabulation</strong> character to any number <strong><code>T</code></strong>, <strong><code>&gt; 1</code></strong>, the substitution of <strong>spaces</strong> to <strong>tabs</strong>, with the options <strong>Edit- Blank operations - Space to TAB …</strong>, is <strong>almost</strong> correct.</p>
<p dir="auto">I said “almost”, as I noticed that, when an <strong>unique</strong> space is located at position, <strong><code>k*T</code></strong>, whatever integer <strong>k</strong>, it could have been changed into a <strong>tabulation</strong> character of <strong>one-character</strong> width !</p>
<p dir="auto">But, if you set the <strong>tabulation</strong> size <strong><code>T</code></strong> to the value <strong><code>1</code></strong> and that you select one of the <strong>two</strong> options <strong>Space to TAB …</strong>, the arrangement of text is <strong>kept</strong> by adding any range of <strong>tabulations</strong>, of <strong>one-character</strong> long, systematically followed by a <strong>last space</strong> character ! It looks like a (small) <strong>bug</strong> :-((</p>
<p dir="auto">If you mind about it, just perform the following simple <strong>S/R</strong>, in <strong>extended</strong> or <strong>regex</strong> mode, to change that <strong>space</strong> into a <strong>tabulation</strong> character :</p>
<p dir="auto">Find what : <strong><code>\x20</code></strong><br />
Replace with : <strong><code>\t</code></strong></p>
<hr />
<p dir="auto">By the way, could you explain to me about the real <strong>interest</strong> in changing any <strong>space</strong> by a <strong>tabulation</strong> of <strong>one-character</strong> long ? For memory, they, both, belong to the Unicode <strong>horizontal blank</strong> characters range, which you may search for, with the <strong><code>\h</code></strong> syntax and which matches any of the <strong>3</strong> characters, below :</p>
<ul>
<li><strong><code>\t</code></strong> or <strong><code>\x09</code></strong> ( <strong>Tabulation</strong> or <strong>HT</strong> )</li>
<li><strong><code>\x20</code></strong> ( <strong>Space</strong> or <strong>SP</strong> )</li>
<li><strong><code>\xa0</code></strong> ( <strong>No-Break Space</strong> or <strong>NBSP</strong> )</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/16166</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/16166</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 31 May 2016 22:01:15 GMT</pubDate></item></channel></rss>