[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-devel
Subject:    [ jEdit-devel ] [jedit:patches] #583 change auto indent behavior when indent width != tab width
From:       "Alan Ezust" <ezust () users ! sf ! net>
Date:       2017-03-26 14:27:37
Message-ID: /p/jedit/patches/583/82a801bd82ab311a3cd7f21e3ce16bc152092f8d.patches () jedit ! p ! sourceforge ! net
[Download RAW message or body]

[Attachment #2 (multipart/related)]


--===============2732023474791639985==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

- **assigned_to**: Alan Ezust
- **Group**:  --> 



---

** [patches:#583] change auto indent behavior when indent width != tab width**

**Status:** open
**Group:** 
**Labels:** auto-indent 
**Created:** Mon Apr 04, 2016 06:08 PM UTC by lundril
**Last Updated:** Wed Apr 13, 2016 10:51 AM UTC
**Owner:** Alan Ezust
**Attachments:**

- [auto_indent_change.patch](https://sourceforge.net/p/jedit/patches/583/attachment/auto_indent_change.patch) \
(1.2 kB; text/x-patch)


With the current jedit trunk (and also the previous jedit 5.2.0 release) I
get the following behavior when using auto-indent == full and
tab width != indent width.
Here is an example with tab width == 8 and indent width == 4.
t_ marks tab, _ marks a whitespace.

~~~~
int myfunc(int a)
{
____if (a==5) {
____t_  printf("Hello World\n");
____}
}
~~~~


But I would like to get (and I think this is also more correct):

~~~~
int myfunc(int a)
{
____if (a==5) {
t_      printf("Hello World\n");
____}
}
~~~~

So basically I want that the "printf" line simply uses one TAB and not a
combination of 4 SPACEs + one TAB.

The reason why I think this is more correct is, that when indenting the
whole function with "shift-TAB", then the indentation will be as in the
second example.





---

Sent from sourceforge.net because jedit-devel@lists.sourceforge.net is subscribed to \
https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at \
https://sourceforge.net/p/jedit/admin/patches/options.  Or, if this is a mailing \
                list, you can unsubscribe from the mailing list.
--===============2732023474791639985==
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit

<div class="markdown_content"><ul>
<li><strong>assigned_to</strong>: Alan Ezust</li>
<li><strong>Group</strong>:  --&gt; </li>
</ul>
<hr/>
<p><strong> <a class="alink" \
href="https://sourceforge.net/p/jedit/patches/583/">[patches:#583]</a> change auto \
indent behavior when indent width != tab width</strong></p> \
<p><strong>Status:</strong> open<br/> <strong>Group:</strong> <br/>
<strong>Labels:</strong> auto-indent <br/>
<strong>Created:</strong> Mon Apr 04, 2016 06:08 PM UTC by lundril<br/>
<strong>Last Updated:</strong> Wed Apr 13, 2016 10:51 AM UTC<br/>
<strong>Owner:</strong> Alan Ezust<br/>
<strong>Attachments:</strong></p>
<ul>
<li><a class="" href="https://sourceforge.net/p/jedit/patches/583/attachment/auto_indent_change.patch">auto_indent_change.patch</a> \
(1.2 kB; text/x-patch)</li> </ul>
<p>With the current jedit trunk (and also the previous jedit 5.2.0 release) I<br/>
get the following behavior when using auto-indent == full and<br/>
tab width != indent width.<br/>
Here is an example with tab width == 8 and indent width == 4.<br/>
t_ marks tab, _ marks a whitespace.</p>
<div class="codehilite"><pre>int myfunc(int a)
{
____if (a==5) {
____t_  printf("Hello World\n");
____}
}
</pre></div>


<p>But I would like to get (and I think this is also more correct):</p>
<div class="codehilite"><pre>int myfunc(int a)
{
____if (a==5) {
t_      printf("Hello World\n");
____}
}
</pre></div>


<p>So basically I want that the "printf" line simply uses one TAB and not a<br/>
combination of 4 SPACEs + one TAB.</p>
<p>The reason why I think this is more correct is, that when indenting the<br/>
whole function with "shift-TAB", then the indentation will be as in the<br/>
second example.</p>
<hr/>
<p>Sent from sourceforge.net because jedit-devel@lists.sourceforge.net is subscribed \
to <a href="https://sourceforge.net/p/jedit/patches/">https://sourceforge.net/p/jedit/patches/</a></p>
 <p>To unsubscribe from further messages, a project admin can change settings at <a \
href="https://sourceforge.net/p/jedit/admin/patches/options.">https://sourceforge.net/p/jedit/admin/patches/options.</a> \
                Or, if this is a mailing list, you can unsubscribe from the mailing \
                list.</p></div>
--===============2732023474791639985==--



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic