Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

all spaces replaced by tabs when ctrl+shift+f

Tags:

eclipse

jsp

working in eclipse,when I type 'tab',it insert 4 spaces,it works well.but after ctrl +shift +f to format,all the 4 space will been replaced by tabs.how to stop it?

like image 997
zhu wang Avatar asked Oct 07 '22 12:10

zhu wang


1 Answers

Window->Preferences->Java->Code Style->Formatter: Edit Active profile->Indentation->Tab Policy: Select Spaces

You can't change the default profiles so you must provide a new profile name, then press the Apply button, then the Okay button. It may help to press the Apply button once you have returned to the Formatter screen. Go back and look at the Tab Policy again to verify that your changes were saved.

like image 175
user1848921 Avatar answered Oct 10 '22 03:10

user1848921