Eclipse设置Tab键为空格!

今天设置Eclipse中按Tab键为4个空格,这里标记下!

Window-->Preferences-->Java-->Code Style-->Formatter

然后右边选择 Edit...按钮,在General Settings页中 Tab policy 右边的下拉框,选择Space only!

然后下面的Indentation size 和 Tab size 都设置成你要的空格数即可!一般是4个空格!!

注意:3.6之前版本好像设置Window-->Preferences-->General-->Editors-->Text Editors

右边的选项Insert spaces for tabs 勾上!然后 Displayed tab width =4也可以!但3.6不行!之前的我没试过...

=======================
问题:

没办法保存


=======================
解决:

new 一个后,再选择即可。






(eclipse 不让在自己的 build-in 中改。)













-




猜你喜欢

转载自lixh1986.iteye.com/blog/2103544