设置Eclipse中的tab键为4个空格的完整方法
来源:互联网 发布:南充广电网络客服电话 编辑:程序博客网 时间:2024/05/17 08:12
1.点击 window->preference-,依次选择 General->Editors->Text Editors,选中右侧的 insert space for tabs;如下图所示,保存,第一步完成;
2.点击 window->preference-,依次选择 java(或C++)->code style ->formatter,点击右侧的editor,选则左侧 tab policy的值为spaces only,确定,应用保存即可,如下图所示:
若出现应用Apply按钮为灰色的情况,需要回到上一步,点击new按钮,根据当前的样式重新生成一个新的样式并保存,重复第2步,编辑该样式即可,如下图:
上面仅仅是针对Eclipse基本的Editor设置。对于Java/HTML/Ant等扩展编辑器,你还不得不单独去设定
* Preference:
1). For Java: sets java code style in eclipse
windows->preferences->java->Code style->Formatter
add a new profile , for more detail, test it in eclipse please
2). For Ant: sets build.xml ineclipse
windows->preferences->Ant>Editor->Formatter
uncheck [Use tab character instead of spaces] option.
3). For Html:
windows->preferences->Web and XML->HTML Files->HTML Source
select "Indent using tabs" and set space =2
4). For XML:
windows->preferences->Web and XML->XML Files->XML Source
select "Indent using tabs" and set space =2
5). For Properties
3). 如何配置jsp,properties等文件默认使用UTF-8编码创建或者阅读?
(Eclipse3.2+) Windows->General->Content Types下选择指定的扩展名,然后说明相应的编码,然后Update.
4). 转换存在文件的回车换行格式
我在xml中遇到这种问题,我改到的地方只是在windows->preferences->myeclipse->files and editors->xml->xml source 下面的formatting栏中将line width 设置成172 ,默认是72.
我想,可能是因为line width 过小,导至在fomat时自动把xml 标签split掉,然后又加了一些多余的空格,因而改变了xml 实际内容。
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法(Pydev)
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的完整方法
- 设置Eclipse中的tab键为4个空格的方法!
- 设置Eclipse中的tab键为4个空格
- Eclpise_设置Eclipse中的tab键为4个空格
- 设置 Eclipse 中的 Tab 键为 4 个空格
- Eclipse设置Tab键为4个空格的步骤(*默认是8个空格*)
- Monkey 测试一 Monkey 入门
- 多核DSP硬件信号量相关说明
- 单线程环境中对象大小固定的内存池
- 【VBA研究】VBA通过HTTP协议实现邮件轨迹跟踪查询
- 吝啬的国度
- 设置Eclipse中的tab键为4个空格的完整方法
- shiro SpringMvc Hibernate 入门
- Android项目名上黄色叹号提示解决方案
- 黑马程序员17.File&Properties
- comm比较两个文件的异同
- Equal Sum Sets
- ActivityGroup打开空文件夹焦点问题及返回键问题
- phpstudy apache无法启动解决方法,phpstudy教程,动态IP无公网IP时phpstudy网站发布到外网
- HDU 2639 Bone Collector II(01背包变型)