Domanda

I have alot of code that has white space to the left of the lines of code in my eclipse project. I would like to select pieces of this code and remove the extra white spacing so each line lines up with the left edge of the window.

È stato utile?

Soluzione

You can select the code you wish, and press SHIFT+TAB until the code lines up to the edge of the screen. You could also go to:

Window->Preferences->general->Editors->Text Editors

and when you're there, specify the tab width under:

Displayed Tab Width.

You can also customize Eclipses' formatter:

Go to:

Window->Preferences->Java->Code Style->Formatter

Select the formatter and press Edit. Edit it to your desire.

Then select the text you wish to format and press Ctrl+Shift+F

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top