Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » auto tabbing ...(Simple configuration.)
auto tabbing ... [message #741771] Wed, 19 October 2011 22:08 Go to next message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Hi.

I'm using:

Eclipse IDE for Java Developers

Version: Helios Service Release 2
Build id: 20110218-0911

I have a .java file I'm editing.
Some of the lines are tab indented for readability.
If I return at the end of one of these lines a new line is created as expected, however, instead of the cursor being at the start of the new line, it moves to the same initial tab stop as the previous indented line.

Can someone please tell me how to change this.
I have been through the Preferences dialogue several times and don't see anything useful.

Best wishes.
Re: auto tabbing ... [message #741934 is a reply to message #741771] Thu, 20 October 2011 03:01 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
Please see the JDT FAQs -
http://wiki.eclipse.org/JDT/FAQ#How_can_I_disable_auto-indentation_in_the_Java_editor.3F
Re: auto tabbing ... [message #741990 is a reply to message #741934] Thu, 20 October 2011 04:20 Go to previous messageGo to next message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Hi Deepak.

Thanks for that.
It has changed the behaviour slightly but not as far as my question goes.

If you want to know what's changed ...
Previously, if I had the cursor at the start of a line with something on it (say a declaration of an int), and that line was tab indented, and I pressed return; the line would move down one (to create the new empty line above); the cursor would also move down with the line (as per a plain text editor) but the cursor would move from the start of the line to the end of the tab indent (i.e. to the start of the declaration of int).
This has now changed and behaves as a plain text editor which is great.

So, this hasn't solved the issue.
If I'm at the end of a tab indented line and press return ...
... a new line is created below ...
... the cursor moves down to the new line ...
... the cursor moves from the start of the new line to co-incide with the tab indent of the previous line ...

Best wishes.
Re: auto tabbing ... [message #742058 is a reply to message #741990] Thu, 20 October 2011 06:10 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 10/20/2011 9:50 AM, davidianwalker wrote:
> So, this hasn't solved the issue.
> If I'm at the end of a tab indented line and press return ...
> .. a new line is created below ...
> .. the cursor moves down to the new line ...
> .. the cursor moves from the start of the new line to co-incide with the
> tab indent of the previous line ...

You cannot change that. (I also wonder why you would want to change that..)
Re: auto tabbing ... [message #742409 is a reply to message #742058] Thu, 20 October 2011 13:18 Go to previous messageGo to next message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Deepak Azad wrote on Thu, 20 October 2011 02:10

You cannot change that.


I'm new here but I don't believe that's strictly correct.

JDT-FAQ - Eclipsepedia wrote

Get the code via anonymous access, do your work and then pass the work on to a committer (in a patch attached to a bug report) for inclusion in the repository.


wiki.eclipse.org/CVS_Howto#Anonymous_CVS

Deepak Azad wrote on Thu, 20 October 2011 02:10
I ... wonder why you ... want to change that.


I'm not nebulously poking around for information.

Regardless, wonder no more ...

I like to use simple tools that allow me to develop strong neural paths viz-a-viz visualizing layout of code while writing it and having a concomitant muscle memory for achieving that without any omission.

A program forcing me not to do this is contrary to that development, i.e. interrupts me from moving on to higher order thinking, and significantly, it's detrimental to me using more native platforms.

In other words, it's going to make Eclipse use unnecessarily burdensome and/or error prone and may add unnecessary difficulty to using simpler tools.

You might not use simple tools often or at all.
Maybe you do but haven't considered this.
Nevertheless, that should be easy for you to understand and perhaps sympathize with.

Further, regardless of the fact that at the moment I don't have a problem with the Eclipse tab positions per se (withstanding the previously mentioned), there may come a time where I wish to use a particular layout under a particular circumstance for a particular reason.
It seems reasonable to me that I should be able to type what I like without hindrance.

Having a program adding to what I type, without providing me an opportunity, at a minimum, to change that behaviour to "do not add anything extra to what I do", is not a sane fallback.

That's an extremely common axiom.
I have to assume you haven't encountered it elsewhere, nevertheless, I suspect it will be simple for you to apply it here.

Best wishes.

[Updated on: Thu, 20 October 2011 13:45]

Report message to a moderator

Re: auto tabbing ... [message #742457 is a reply to message #742409] Thu, 20 October 2011 14:07 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
You are always welcome to open a bug and provide a patch, especially if
you feel this strongly about it!

Pressing 'enter' at the end of a line places the caret on the new line
at the same column/alignment as the previous line. How often do you do
something different while writing code in any language?
Re: auto tabbing ... [message #742732 is a reply to message #742457] Thu, 20 October 2011 19:28 Go to previous messageGo to next message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Deepak Azad wrote on Thu, 20 October 2011 10:07
You are always welcome to open a bug and provide a patch, especially if
you feel this strongly about it!


Absolutely.

Deepak Azad wrote on Thu, 20 October 2011 10:07
Pressing 'enter' at the end of a line places the caret on the new line
at the same column/alignment as the previous line. How often do you do
something different while writing code in any language?


The first source file I stumbled across.

www.openbsd.org/cgi-bin/cvsweb/src/bin/cat/cat.c?rev=1.20;content-type=text%2Fplain

It looks like every closing brace, every if else, cases in the switch in main, dozens of others I can't be bothered documenting in the other functions on that page, the ones I'm too tired to notice, etcetera ...

It's incredibly common.

That's beside my points, though.

Thank you for being polite about this.

Best wishes.

Sorry for the non-clickable links, I'm not allowed to hyperlink ... yet.

[Updated on: Thu, 20 October 2011 19:59]

Report message to a moderator

Re: auto tabbing ... [message #742915 is a reply to message #742732] Fri, 21 October 2011 00:31 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 10/21/2011 12:58 AM, davidianwalker wrote:
> If I have tab indented lines and I return a new line and tab backwards I
> get 4 space tabs, if I tab forwards I get 8 space tabs.

That does not sound right. A tab should have a fixed width - tabbing
backwards or tabbing forwards should not matter. (This fixed width can
also be configured at Preferences > General > Editors > Text Editors >
Displayed tab width )
Re: auto tabbing ... [message #743545 is a reply to message #742915] Fri, 21 October 2011 15:12 Go to previous messageGo to next message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Hi Deepak.

Yeah.
I tried to verify that after I posted and I couldn't which is why I removed it.

Funny thing is, I removed that within a few minutes of posting and you've responded five hours later and managed to quote it. Go figure. Grin

Here's where I stand.
I expect this type of software (coding) to provide opportunity for "do not add anything to what I do". If it doesn't, in my book it's failed on some basic level.
I don't mean that in the sense of it should be done this way or it's not cool, rather in the sense of "say what, I really can't turn this stuff off ...".
I have to wonder how the developers go when they use vi or a shell or Notepad or whatever. Do they understand that's a baseline for coding and extremely common and it's difficult to move from one environment to another.
Those types of environments are baselines - I don't think that's overstating it.

I don't have enough experience with JAVA to consider it viable to commit myself to looking through the tree to implement this (notwithstanding it has to approved by someone with access anyway). Being familiar enough with a complex project to be able to write a useful patch also requires significant exposure to the tree. As a corollary, I don't possess that either, obviously (see previous point).

So, I might file a PR and let it go for now.
As a workaround, I'll continue to write my code somewhere else - a simple plain text editor (e.g. Notepad) and copy and paste.

Best wishes.
Re: auto tabbing ... [message #743570 is a reply to message #743545] Fri, 21 October 2011 15:28 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
You can access this forum via 2 ways - nntp or the http link. Sometimes
the sync between these two gets messed up. (I use the nntp interface)
Re: auto tabbing ... [message #743624 is a reply to message #743570] Fri, 21 October 2011 16:13 Go to previous messageGo to next message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Cool.

I've filed a PR.
I notice you on the mail list.

Apart from this recent incursion into Eclipse I always code in simple environments - vi for C and Notepad on Windows for web stuff - and I know a lot of people who do likewise.
This is a big deal for me, I'm new to JAVA (hence using an IDE) but this is disrupting me a lot and influencing my choice of IDE.

Best wishes.
Re: auto tabbing ... [message #745163 is a reply to message #743624] Sat, 22 October 2011 16:32 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
Thanks for the bug report!

In case you did not already know, Eclipse is not just a Java IDE - There
is CDT for C and C++ (http://www.eclipse.org/cdt/), WTP for all the web
stuff (http://www.eclipse.org/webtools/).
Re: auto tabbing ... [message #745765 is a reply to message #745163] Sun, 23 October 2011 01:54 Go to previous message
davidianwalker is currently offline davidianwalkerFriend
Messages: 7
Registered: October 2011
Junior Member
Deepak Azad wrote on Sat, 22 October 2011 12:32
Thanks for the bug report!


You're welcome.
Thanks for respecting my voice.

As far as the PR goes, it goes without saying I agree 100% on your initial response.
I'd love to submit code on that and we could all move on ... but I'm new here.

As per usual, I have to defer to more capable people - if there's a commit on this, TIA to whomever. Grin
Thank you regardless, there's a lot of code that "someone" has written and I'm using it.

Best wishes.
Previous Topic:Can't figure out how to use key Java IDE features
Next Topic:JadClipse not opening class files
Goto Forum:
  


Current Time: Thu Apr 18 06:27:48 GMT 2024

Powered by FUDForum. Page generated in 0.02962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top