Resolves eclipse in php to replace the tab key with a space

  • 2020-06-19 09:53:55
  • OfStack

I used eclipse to develop PHP project. According to the company's development specifications, four Spaces should be used to replace the tab key. I searched a lot on the Internet, but it was not comprehensive.
First go to preference: window (windows)- > Preferences (preferences...).
1. windows= "preferences=" general= "editors=" check "insert spaces for tabs"
2. windows= "preferences=" php= "typing =" Tick "insert spaces for tabs (...) "
At this point, the configuration is complete.

However, due to the different versions, some problems occur: if{then press the enter key to wrap the line, which will automatically indent 1 tab. This tab is not replaced with 4 Spaces correctly, which is the solution
Enter: windows= preferences= phpeclipse= php= formatter = > style to see whether the option "indentation is represented by a tab" is selected (the default is selected), if selected, it will not be selected, if not, it will be selected, restart eclipse will find the setting successful

Related articles: