Opened up a tab separated file in Eclipse. When I copy one line and then paste it into the same file, all the tabs have been converted into spaces. This kind of ruins the tab separated format...
How can I stop Eclipse from messing up my files?
Have you checked
Window -> Preferences -> General -> Editors -> Text Editors ->
Insert spaces for tabs
Related
I have tried every suggestion I could find, but I can't get my code to get indented with tabs.
java -> code style -> formatter -> edit -> indentation -> "use spaces to indent wrapped lines" is unchecked and policy is set to tab only.
general -> editors -> text editors -> "insert spaces for tabs" is unchecked.
Still eclipse replaces my tabs with spaces and does auto-indentation with spaces.
I am slowly going insane
(eclipse luna)
The answer to my question can be found here : How can I get Eclipse to insert tabs instead of spaces for Java content assist?
It appears to be a bug in Eclipse, currently.
I am using Eclipse Luna. I have installed the Perl EPIC plugin. I want to indent 4 spaces instead of TAB.
I have checked Window -> Preferences -> General -> Editors -> Text Editors -> Insert spaces for tabs, but still when there is need to auto indent a new line, Eclipse still indents with TAB instead of spaces.
How do I change it so EPIC will use spaces instead of tabs for indentation in Perl files?
Late answer but I ran into the same issue, found this post, and subsequently how to change the formatting settings for Perl EPIC in Eclipse.
From the main IDE workspace, click the Window menu and then choose Preferences.
Scroll down to Perl EPIC and expand it in the tree.
Click the Editor entry.
In the right panel under the Appearance tab, you can change your preferences for Insert tabs/spaces on indent and whether or not to use spaces instead of tabs.
I know how to indent any Java files by using the "Source", "Correct
indentation" Menu.
How to indent any XML files with two spaces (instead of tab)?
When I am editing a java file, in the java perspective, the Source menu appear, but when
I change to an XML file in the same perspective, the Source menu disappear so I
don't know how to indent it.
I use the latest Eclipse for Windows 8.1.
Format XML code in Eclipse
This link seems to help - eclipse lets you autoformat code using Ctrl+Shift+F and you should be able to customise what the autoformat will actually do in Window -> Preferences -> XML -> XML Files -> Editor.
Is there a way to configure tab spaces for Eclipse Compare/Merge editor?
I have the Text Editor to use 2 spaces for tab and "Insert spaces for tabs" but this doesn't seem to take effect in the Compare/Merge editor. It's quite annoying since it's occasionally messing up the indentation in the source code. I guess my other option is to use an external tool but it would be great if this can be configured within Eclipse.
I'm using Indigo SR2 (64-bit)
--
This appears to be a related Eclipse bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=259410
You can choose to ignore whitespaces in the compare editor. Either you right click in the editor and choose Ignore White Space or you set this in eclipses preferences Window -> Preferences -> General -> Compare/Patch -> Ignore White Space
I'm using Galileo, and I've gone:
Preferences -> General -> Editors -> Text Editors -> Spaces for tabs
but the editor still inserts real tabs when I press the TAB key. This is driving me crazy. How do I force eclipse to put in spaces for tabs? I'm editing Java files.
Thanks
What about :
Window > Preferences > Java > Code Style > Formater
and, then, edit the formating style (it'll open another dialog)
In that new dialog :
General settings > Tab policy => choose "Spaces only", instead of "Tabs only"
You can also set the "Tab size".
Go to Preferences -> Java -> Code Style -> Formatter.
Click edit next to your active profile.
Change your tab policy to Spaces Only