Active 5 years, 4 months ago. Viewed 89k times. Improve this question. Peter Mortensen Joshua Hyatt Joshua Hyatt 1, 2 2 gold badges 10 10 silver badges 21 21 bronze badges. Some of the reasons are highlighted in the answer by caleb below. I'd recommend acquiring a taste for spaces! However work teams may require tabs mine unfortunately does.
Both tabs and spaces are equally acceptable and widely prevalent. What's important is consistency in usage throughout a project.
Add a comment. Active Oldest Votes. Select Text Editors from tree menu. Uncheck Insert spaces for tabs. After that, run Format menu from context menu and save the file:. Improve this answer. Kohei Mikami Kohei Mikami 2, 20 20 silver badges 20 20 bronze badges. Lots more elaborate than my answer. Would it format ALL my files or at least open ones that way? Or just the active one? You can also format all files under a folder. Otherwise just checking "insert tabs for spaces" won't work.
And if you look carefully you'll see that the correct answer is not highlighted, in the last picture there is also Correct Indentation right above the highlighted Format.
Select Text Editors from tree menu. Uncheck Insert spaces for tabs. Improve this question. Mark Rotteveel Teddu Teddu 6 6 silver badges 15 15 bronze badges. Try formatting your existing code in eclipse. LukeMelaia: How do we do that? Chinmay He's having a problem with applying it to his java files, not changing the settings.
Show 2 more comments. Active Oldest Votes. Improve this answer. Community Bot 1 1 1 silver badge. Luke Melaia Luke Melaia 1, 14 14 silver badges 22 22 bronze badges. Add a comment. Sign up or log in Sign up using Google. Sign up using Facebook. Never use tabs insides lines, always use tabs at the front of lines. This allows you to use your editor to adjust to your desired indent level without impacting your co-workers view of the file. Challenge: Find an example where tabs at the front of the line loses alignment.
I use Kedit for just this thing. Since it's an older editor, I use one of it's scripts to handle unicode files. You might also want to look at some of the other smart editors. I use Eclipse for Java EE developer 4.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. Learn more. Tabs and spaces conversion Ask Question. Asked 13 years, 3 months ago. Active 5 years, 3 months ago. Viewed 38k times. Improve this question. Robse Robse 3 3 gold badges 13 13 silver badges 27 27 bronze badges. Check the following link that I had written which contains the steps to convert tabs to spaces from Eclipse. Add a comment. Active Oldest Votes. Make sure you have your editor set to use spaces instead of tabs. Improve this answer.
0コメント