Where is the option for inserting spaces (not tabs) while typing? [message #163764] |
Thu, 10 June 2004 16:22  |
Eclipse User |
|
|
|
I'm using M9... but where has the option for inserting spaces instead of
tabs while typing disappeared to? I see the Ant Editor preferences has a
"Insert spaces for tabs when typing" option. I remember the Java Editor
preferences having a similar option, however, I can't seem to find it
anymore. I looked around, and the closest thing to such an option is the
Java-Code Style-Code Formatter preference in the "General settings" under
the "Indentation." However, this doesn't seem to have the desired effect. I
want spaces rather than tabs when I use the tab key in a Java source file.
Any insight into this issue would very much appreciated.
Thanks.
Terence
|
|
|
|
|
|
Re: Where is the option for inserting spaces (not tabs) while typing? [message #163826 is a reply to message #163764] |
Fri, 11 June 2004 04:27   |
Eclipse User |
|
|
|
There are two different options:
- what the editor does when you press TAB (except for smart tab, see below):
> Java->Editor->Typing->Insert spaces for tab
- what the formatter does when formatting (this also affects
auto-indentation, template insertion, and, to make it easily confusable
with the first point, smart tab)
> Java->Code Style->CodeFormatter
-tom
Terence Song wrote:
> I'm using M9... but where has the option for inserting spaces instead of
> tabs while typing disappeared to? I see the Ant Editor preferences has a
> "Insert spaces for tabs when typing" option. I remember the Java Editor
> preferences having a similar option, however, I can't seem to find it
> anymore. I looked around, and the closest thing to such an option is the
> Java-Code Style-Code Formatter preference in the "General settings" under
> the "Indentation." However, this doesn't seem to have the desired effect. I
> want spaces rather than tabs when I use the tab key in a Java source file.
> Any insight into this issue would very much appreciated.
>
> Thanks.
>
> Terence
>
>
|
|
|
Re: Where is the option for inserting spaces (not tabs) while typing? [message #164012 is a reply to message #163764] |
Fri, 11 June 2004 15:04  |
Eclipse User |
|
|
|
Thank you very much to everyone who replied. Found the option. Also found
out that it's been inserting spaces all this time (and not tabs). I thought
that it had been inserting tabs because I used the backspace key to move to
the beginning of the (empty) line and one press causes the cursor to jump to
the beginning of the line. If you use the arrow keys, then the cursor moves
in "space" steps.
Just as a test, I unchecked the option for inserting spaces for tabs under
Java->Editor->Typing, but it didn't seem to alter the behaviour of using the
tab key for inserting spaces (as described above).... until I turned off
"tab indents the current line." Turning this option off, the editor now
behaves normally (i.e. pressing tab inserts 4 spaces, and each backspace
deletes a single space).
Thanks again for your help.
"Terence Song" <terence.song@bristol.ac.uk> wrote in message
news:caafeg$76e$1@eclipse.org...
> I'm using M9... but where has the option for inserting spaces instead of
> tabs while typing disappeared to? I see the Ant Editor preferences has a
> "Insert spaces for tabs when typing" option. I remember the Java Editor
> preferences having a similar option, however, I can't seem to find it
> anymore. I looked around, and the closest thing to such an option is the
> Java-Code Style-Code Formatter preference in the "General settings" under
> the "Indentation." However, this doesn't seem to have the desired effect.
I
> want spaces rather than tabs when I use the tab key in a Java source file.
> Any insight into this issue would very much appreciated.
>
> Thanks.
>
> Terence
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03293 seconds