Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Where is the option for inserting spaces (not tabs) while typing?
Where is the option for inserting spaces (not tabs) while typing? [message #163764] Thu, 10 June 2004 20:22 Go to next message
Terence Song is currently offline Terence SongFriend
Messages: 14
Registered: July 2009
Junior Member
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 #163776 is a reply to message #163764] Thu, 10 June 2004 20:31 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
I believe this would be the correct location for M9 (but I am using
I200406100800)
Java>Editor>Typing>Insert spaces for tab

HTH
Darins

"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
>
>
Re: Where is the option for inserting spaces (not tabs) while typing? [message #163791 is a reply to message #163764] Thu, 10 June 2004 20:26 Go to previous messageGo to next message
Mike Miller is currently offline Mike MillerFriend
Messages: 22
Registered: July 2009
Junior Member
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

I think what you are looking for is in Window->Preferences->Java->Code
Style->CodeFormatter, then edit the style and the first tab is Indentation
and has a checkbox.
Re: Where is the option for inserting spaces (not tabs) while typing? [message #163799 is a reply to message #163764] Thu, 10 June 2004 20:35 Go to previous messageGo to next message
Mike Miller is currently offline Mike MillerFriend
Messages: 22
Registered: July 2009
Junior Member
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

I also found in the preferences Java->Editor->typing tab, about 1/2 way
down - insert spaces for tab (checkbox)
Re: Where is the option for inserting spaces (not tabs) while typing? [message #163826 is a reply to message #163764] Fri, 11 June 2004 08:27 Go to previous messageGo to next message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
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 19:04 Go to previous message
Terence Song is currently offline Terence SongFriend
Messages: 14
Registered: July 2009
Junior Member
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
>
>
Previous Topic:Eclipse Jindent plugin updated for 3.0RC1
Next Topic:Multiple locations for a JAR sourcepath
Goto Forum:
  


Current Time: Fri Aug 23 11:17:16 GMT 2024

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

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

Back to the top