Satu

参考:java编程规范之eclipse设置tab键为四个空格

 

Eclipse版本

 

1、点击菜单Window > Preference

 

2、在Preferences窗口中,展开General > Editors,选Text Editors,勾选Insert spaces for tabs,点击Apply

 

3、在Preferences窗口中,展开Java > Code Style,选Formatter,点击New...;在New Profile窗口中,填写Profile name之后,点击OK

 

4、在弹出的Profile \'...\'窗口中,展开Indentation,设置Tab policy: Spaces only,点击OK

 

5、在Preferences窗口中,点击Apply and Close。

以后,每当我们在代码编辑器中按下Tab键,就会插入4个空格。

 

6、如果想显示空格,可以在Preferences窗口中,展开General > Editors,选Text Editors,勾选Show whitespace characters (configure visibility)

分类:

技术点:

相关文章:

  • 2022-01-11
  • 2021-08-02
  • 2021-11-18
  • 2021-11-09
  • 2021-08-15
  • 2021-04-13
  • 2021-10-26
猜你喜欢
  • 2021-04-08
  • 2021-10-04
  • 2021-11-09
  • 2021-05-05
  • 2021-12-05
  • 2022-01-01
相关资源
相似解决方案