Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inserting Spaces Instead of Tabs in ALL Files

Our unit testing setup makes sure you use spaces instead of tabs in all files, including .jsp and jspx. I have set this option for the general editor but the jsp editor does not recognize/see this option and still continues to use tabs instead of spaces.

Is there a way to force the jsp editor to insert spaces instead of tabs?

:)

like image 712
bobber205 Avatar asked Aug 11 '10 17:08

bobber205


People also ask

Are spaces better than tabs?

Tabs Debate. Pro-spaces programmers argue that using the space bar makes the layout more flexible. However, pro-tabs users rebut saying tabs makes code more readable and aesthetically pleasing.

How do you fix inconsistent use of tabs and spaces in indentation?

To solve the error, remove the whitespace and only indent the lines in the code block using tabs or using spaces. Make sure the lines of code in the code block at indented to the same level.


1 Answers

Go to Window > Preferences and set option Indent using spaces in the following categories:

  • Web > HTML files > Editor (covers JSP)
  • XML > XML files > Editor (covers JSPX and Facelets)
  • Web > CSS files > Editor (you'd like to cover this as well)
like image 177
BalusC Avatar answered Oct 18 '22 15:10

BalusC