I use eclipse to develop PHP projects. According to the company's development specifications, the tab key must be replaced with 4 spaces. I searched a lot on the Internet, but none of them are comprehensive. Now the detailed configuration is listed as follows:
Enter first Preferences: Window (windows)->Preferences...)
1. windows=》preferences=》general=》editors=》text editors Check "insert spaces for tabs" ”
2. windows=》preferences=》phpeclipse=》php=》typing Check “insert spaces for tabs (…)”
At this point, the configuration is complete.
However, due to different versions, some problems will occur: if{ and then press the enter key to change the line, it will automatically indent a tab. However, this tab is not correctly replaced with 4 spaces. The solution
Enter: windows=》preferences=》phpeclipse=》php=》formatter =>style Check whether the option "indentation is represented by a tab" is selected (selected by default), If it is selected, do not select this option. If not, select this option and restart eclipse. You will find that the setting is successful