Spaces instead of tabs in Eclipse (Galileo 3.52)? - eclipse

Is there any way in Eclipse (Galileo 3.52) to have it replace tabs with spaces ("soft tabs")? I've tried two things so far . . .
Windows>Preferences>Editors>Text Editors... check "Insert spaces for tabs"
...and...
Window->Preferences->Java->Code Style->Formatter->Edit... "Use Spaces to indent wrapped lines"
(... this forces you to create a new profile to save these settings)
This produces partial success - the first tab is turned in to spaces but subsequent ones are still tabs. So if I type
tabtab 1234
...I end up with...
spacespacespacespace tab 1234

You can do:
Window -> Preferences -> Java -> Code Style -> Formatter
Click on “Show” button (or "Edit") right beside the name of the profile you are using.
In the indentantion Tab, change the "Tab Policy" field to "spaces only"
Click Ok, and save the profile with the name you want.

Could the missing setting be the Tab policy: Spaces only combo box in Preferences >Java > Code Style Formatter > Edit > Indentation (right above where you changed Use spaces to indent wrapped lines)?

Related

VSCODE - TAB right after the word not working as expected

vscode:
version - 1.40.2
On a normal text type file, type Hello and hit TAB.
All i want is when i hit tab vscode should register 2/4 spaces (what i have configured in the settings.json for the specific language) not a single space.
HelloTAB
Expected: Hello****|
Actual: Hello*|
Make sure you have unchecked Editor: Detect Indentation. Checking this option will override the Tab Size configuration. E.g. if the opened file has 1 space tab indentation but you have configured a 4 spaces tab indentation - the tab size will be 1 space.
Ctrl + , to open Settings.json
Enter in "spaces" in search
Uncheck Editor: Detect Indentation
Leave Editor: Insert spaces checked if you want to insert actual spaces instead of a tab (i.e. you need to do 4 backspaces if you made a mistake). Or unchecked it if you want to insert actual tabs.
Also, you can check what is the configured tab size for that particular opened file by looking at the bottom right of your editor:

Eclipse tab key inserts tags

I use Eclipse Luna for PHP. However, after a variable or any word, the tab key does not insert a tab, but it converts the word into a tag. For example, a tab after $matches will display <1matches></1matches>.
The problem was held in Window -> Preferences -> Emmet -> Expand abbreviations by Tab key (this option should not be ticked)

Eclipse Continuation Indent

Is there a way to configure the indentation eclipse uses for manual line breaks? It indents by 8 spaces no matter what I do.
I get this:
private static final org.apache.log4j.Logger LOG =
org.apache.log4j.Logger.getLogger(myClassname.class);
when I'd like it to give me this:
private static final org.apache.log4j.Logger LOG =
org.apache.log4j.Logger.getLogger(myClassname.class);
Eclipse's line wrapping can be configured to give me the correct result when the line is too long, but I'd like to be able to get less indentation even if the line break is manual.
In Eclipse Juno
open the preferences dialog (Window > Preferences).
go to the preference page Java > Code Style > Formatter.
press the Edit... button (for the Active profile).
if it is the default one from Eclipse (Eclipse [built-in]), you need to give it a new name.
click on the Line Wrapping tab
set the value to 1 for "Default indentation for wrapped lines" (by default it is 2)
(check the Identation tab and check what the indentation size is set at, by default it should be 4)

Eclipse Spaces & Tabs

I like to display 4 spaces as tab in eclipse, with an actual width on the screen of 2 spaces.
When I save the file, I'd like to have 4 spaces (represented as «.») for a tab:
1st.level
....2nd.level
........3rd.level
In eclipse, I'd like to see this, where a tabstop (represented as «->>») should take the width of two spaces:
1st.level
->2nd.level
->->3rd.level
Is such a behavior possible? Does someone know any addons for that?
Thank you in advance,
~Chris
AnyEdit tools sounds like what you might need.
Open "Preferences" -> "General" -> "Editors" -> "Text Editors"
Set "Displayed tab width" to the number of spaces you would like it to insert.
Tick the Box that says "Insert spaces for tabs"

How can I configure NetBeans to insert tabs instead of a bunch of spaces?

When I hit Tab for indenting code, I like to get a real tab. Meaning that when I select that, I only have one large thing selected. NetBeans inserts 5 spaces instead of a tab when I hit Tab. Is there a way I can change that?
Go to Tools-> Options-> Editor-> Formatting and uncheck Expand tabs to spaces:
Ensure you also pick coherent values for "Number of Spaces per indent" and "Tab Size".
Additionally, you can check all the items in the Language combo and make sure they all use the general setting.
You can also change it in a per-project fashion. Right click on the project icon, select Properties and review the Formatting category.
These menu items remain valid as of NetBeans 8.0.
It seems to work if you select the same value for "Number of Spaces per Indent" and "Tab Size", after unchecking the "Expand Tabs to Spaces" Option, in Tools -> Options -> Editor -> Formatting, for example:
[ ] Expand Tabs to Spaces
Number of Spaces per Indent: [ 4]
Tab Size: [ 4]
....
For NetBeans 7.1.2,
I needed to go to Tools -> Options -> Editor -> Expand Tabs to Spaces and uncheck that one (make sure you have "All Languages" selected). And also put an "8" for both Number of Spaces per Indent and Tab Size.
Just having the same value there does not do the trick for me. It must be 8.
In Tools-> Options-> Editor-> Formatting Expand tabs to spaces should be unchecked and Number of Spaces per Indent should be equal with Tab Size. Also check when you change Language from All languages to other there Override Global Options should be unchecked, too.
Netbeans IDE 8.2 (OSX)
Goto File -> Project Properties (Your Project)
Select Formatting in Categories:
Click on Edit global options.
Then Click on Ok
Uncheck : Expand tabs to space.
Click on : Apply
Click On : Ok
If you want set project specific then :
Select : Use project specific options.
Uncheck : Expand tabs to space.
You can also select Language (PHP)
Then Click on Ok