Eclipse设置Tab键 跨越四个字符 以及 Eclipse设置 代码格式化,非同级时统一采用四个字符区分开。

1. 设置Tab键 跨越四个字符

   打开菜单栏  【windows】,之后一次选择【Preferences】-【General】-【Editors】-【Text Editors】,然后勾选【Insert spaces for tabs】- 以及设置 [Displayed width with] 的值为四,点击 【Apply】,之后再点击【Ok】

设置操作如图:

 2.Eclipse 代码格式化非同级时统一采用四个字符区分开

 打开菜单栏  【windows】,之后一次选择【Preferences】-【Java】-【Code Style】-【Formatter】之后选择 【new】 新建一个Active profile配置 , 选择【Edit】进入Profile 'XX'窗口,选择【Tab policy】值为 Spaces only  设置【Tab size】值为4,设置【Indentation size】值为 4,

如图1:

   如图2:

如图3:

如图4:

猜你喜欢

转载自blog.csdn.net/huxiaochao_6053/article/details/82759176
今日推荐