7

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?

:)

bobber205
  • 12,948
  • 27
  • 74
  • 100
  • 2
    I'm guessing you already saw this post then... http://stackoverflow.com/questions/407929/how-do-i-change-eclipse-to-use-spaces-instead-of-tabs – Eric Aug 11 '10 at 17:16

1 Answers1

20

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)
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • For some reason, my Eclipse (Indigo, Build id: 20110916-0149) uses the HTML settings instead of the XML settings for JSPX pages, even though in the settings it indicates that it will use the XML settings. – Nate C-K Apr 09 '12 at 16:31
  • 1
    You can change the default editor via rightclick, *Open With*. – BalusC Dec 09 '15 at 20:02