I want Ecliipse to have tabs on new lines.

Asked 1 years ago, Updated 1 years ago, 65 views

We are currently implementing Java in Eclipse.

Regarding the indentation setting,
This is the that you want to indent on the tab when a new line is broken.
Even if I try using various websites, I can't help but find 4 spaces.

Enter a description of the image here

There is no problem with the rest of the team, only my environment gets new lines in space even though it is new lines on the tab.
How do I break a new line on the tab when I break a block such as an if statement?

Below is my setting.

Enter a description of the image here
Enter a description of the image here
Enter a description of the image here
Enter a description of the image here

Additional
Enter a description of the image here

eclipse

2022-09-30 20:22

2 Answers

It's solved.
Project → Properties → Java → Formatter

"The ""Enable project-specific settings"" was checked in the settings in , and the tab policies for the formatter were mixed."

"Uncheck ""Enable project-specific settings"" and the formatter set from the window → settings worked and resolved."

Thank you for your cooperation.


2022-09-30 20:22

(My capture has not been translated into Japanese, so please read it accordingly.)

The applicable configuration is Indentation in Java>Editor>Typing in Preferences.In the capture below (although it's hard to understand because it's painted out), as explained, "using spaces", it's set to indent in a space.

Java > Editor > Typing

To change this to tab, assume that the Formatter configuration has tab indentation.

Use the Edit button in Java>Code Style>Formatter to go to the edit screen and change the Indentation>Tab policy setting to Tabs only.(If you are already using tab, save it as space, change it to tab again, and save it.)
Then save and close the Preferences dialog.

Java > Code Style > Formatter

If you open Preferences again and open Java>Editor>Typing, you will be indenting using tab.

uses tab


2022-09-30 20:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.