Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top