Home » Language IDEs » Java Development Tools (JDT) » How to use the TAB key to indent a line of code?
How to use the TAB key to indent a line of code? [message #161749] |
Fri, 28 May 2004 11:02  |
Eclipse User |
|
|
|
Originally posted by: metfan.nowhere.com
I mean, for example, in Jbuilder, there's a feature called
'smart indent', that is, no matter where you put the curson,
when you press the TAB key, the whole line which the curson
is on will be indented, and then no matter how many TAB you
press again, there's no effect anymore. In Eclipse, if the
curson is ahead of the first letter of a line, and you press
TAB, the line will be indented, if you press TAB again, the
line will be indented to the right again, this is not what I
want. And if you put the curson inside the line of code, for
example, inside a variable name, and press TAB, a '\t' will be
inserted into the variable name, that is not what I want again.
Did I make myself clear?
So how to make the TAB key behaviour in Eclipse the same as
the TAB key behaviour in JBuilder? Thanks very much.
|
|
|
Re: How to use the TAB key to indent a line of code? [message #161917 is a reply to message #161749] |
Sat, 29 May 2004 10:20   |
Eclipse User |
|
|
|
just select the whole line (e.g. press home, shift+down) before pressing
tab
metfan wrote:
> I mean, for example, in Jbuilder, there's a feature called
> 'smart indent', that is, no matter where you put the curson,
> when you press the TAB key, the whole line which the curson
> is on will be indented, and then no matter how many TAB you
> press again, there's no effect anymore. In Eclipse, if the
> curson is ahead of the first letter of a line, and you press
> TAB, the line will be indented, if you press TAB again, the
> line will be indented to the right again, this is not what I
> want. And if you put the curson inside the line of code, for
> example, inside a variable name, and press TAB, a 't' will be
> inserted into the variable name, that is not what I want again.
> Did I make myself clear?
> So how to make the TAB key behaviour in Eclipse the same as
> the TAB key behaviour in JBuilder? Thanks very much.
|
|
|
Re: How to use the TAB key to indent a line of code? [message #162005 is a reply to message #161749] |
Sun, 30 May 2004 19:51   |
Eclipse User |
|
|
|
Originally posted by: bytor2001.comcast.net
metfan wrote:
>
> I mean, for example, in Jbuilder, there's a feature called
> 'smart indent', that is, no matter where you put the curson,
> when you press the TAB key, the whole line which the curson
> is on will be indented, and then no matter how many TAB you
> press again, there's no effect anymore.
In Emacs/XEmacs, java-mode (and most other language modes) does
precisely the same thing. It drives me nuts. I switch between
XEmacs and Eclipse constantly so I am constantly running into
differences like this...
-xbytor
|
|
| | | |
Re: How to use the TAB key to indent a line of code? [message #162158 is a reply to message #162093] |
Mon, 31 May 2004 20:23  |
Eclipse User |
|
|
|
Originally posted by: bytor2001.comcast.net
Okay, Okay. I did find that shortly after I posted.
I promise I'll RTFM before I post again.
thanks,
-xbytor
Mariano Kamp wrote:
> xbytor,
>
> that's what I do. I write most of my code to a single line and press
> Ctrl+Shift+F every now and then.
>
> Anyway, regarding your question. Did you try Ctrl+Shift+I? That should
> do what you want.
>
> Is xbytor your first or last name? ;-)
Just a handle. Kinda like 'Cher' and other
mono-nonymous people...
>
> Cheers,
> Mariano
>
> Sam Mesh wrote:
>
>> xbytor wrote:
>>
>>> In XEmacs, I select the entire contents of the file and hit TAB and
>>> it automagically reformats the entire file.
>>
>>
>>
>> What's wrong with Shift+Ctrl+F?
>>
>> --
>> Sam Mesh - http://openrules.com
|
|
|
Goto Forum:
Current Time: Thu Jul 17 00:51:05 EDT 2025
Powered by FUDForum. Page generated in 0.08852 seconds
|