eclipse 常用设置

[b]写好代码需要个好的工具辅助,eclipse完整设置。让你事半功倍![/b]
[b]以下截图为eclipse-photon版本。[/b]

[b]1、字体大小[/b]
[img]http://dl2.iteye.com/upload/attachment/0130/4139/41b660d4-e69e-3989-bff1-a9f62f78824c.png[/img]
详细步骤参考文章: https://www.cnblogs.com/xiezhidong/p/6048256.html

[b]2、tab转空格[/b]
Windows->Preferences->General->Editors->Text Editors,选中“Insert spaces for tabs”。

另外需要针对java文件设置一次:
window->preference-左侧菜单:Java -> Code Style -> Formatter,
然后点击Active profile中的Edit按钮, Tab policy 右边的下拉框,选择Space only
然后下面的Indentation size 和 Tab size 都设置成你要的空格数即可!一般是4个空格

[img]http://dl2.iteye.com/upload/attachment/0130/4141/85cf750a-d523-30a9-a349-a33541ac9fc6.png[/img]
[b]3、自动换行字数[/b]
Preferences->Java->Code Style->Formatter->Edit ->Line Wrapping->Maximum line width:默认80 修改成120就行了。

[b]4、默认utf-8[/b]
a、windows->Preferences->general->Workspace,右侧Text file encoding,选择Other,改变为UTF-8,以后新建立工程其属性对话框中的Text file encoding即为UTF-8。
b、windows->Preferences...打开"首选项"对话框,左侧导航树,导航到general->Content Types,右侧Context Types树,点开Text中每一个子项,并将其编码设置为"UTF-8",点update!
其他java应用开发相关的文件如:properties、XML等已经由Eclipse缺省指定,分别为ISO8859-1,UTF-8,如开发中确需改变编码格式则可以在此指定。

[b]5 、maven设置[/b]
一般需要设置自己的setting.xml,在setting.xml中指定公司的私服、并设置repository的目录(默认是C盘当前用户目录下)
[img]http://dl2.iteye.com/upload/attachment/0130/4143/53e0fc6a-a431-3726-9f99-57eff1c7cf82.png[/img]

setting.xml文件下载[url]http://dl.iteye.com/topics/download/e384f6d0-7f11-3669-af9b-11c8365d7353[/url]

[b]6、jetty插件[/b]
一般web工程在eclipse中启动时,需要指定额外的tomcat来启动,比较繁琐。使用jetty插件启动更方便。不过现在更多的项目使用springboot搭建,这里就不详细说明安装及使用。
[img]http://dl2.iteye.com/upload/attachment/0130/4145/62b5e52e-44ed-3bfe-9bd7-8a51ab57fe78.png[/img]
使用参考文章:https://www.cnblogs.com/Fairy-02-11/p/6186918.html

[b]7、切换为unix下的换行符[/b]
Windows->Preferences->General->Workspace -> New text file line delimiter 选中Unix
https://blog.csdn.net/ljgstudy/article/details/25542279

[b]8、阿里java代码规范插件——强力推荐[/b]
插件地址: https://p3c.alibaba.com/plugin/eclipse/update
https://blog.csdn.net/qq_34359363/article/details/78284187

[b]9、指定jdk启动[/b](部分高版本eclipse不支持低版本jdk)
打开eclipse安装目录下的eclipse.ini
添加参数:
-vm
C:\Program Files\Java\jdk1.7.0_80\bin

11、js、html插件
aptana-3 ?
Spket ?

12、js debug ?

13、 svn忽略target 文件夹 *.settings .classpath .project等文件
在eclipse中,Windows -> Preferences -> Team -> Ignored Resources里点 “Add Pattern”。
添加:target *.settings .classpath .project ,然后再"运用"-->"确定",重新编译代码即可

[b]14、注释模板[/b]
https://blog.csdn.net/KunGe_/article/details/78215580?locationNum=9&fps=1
注释模板下载[url]http://dl.iteye.com/topics/download/8a2d9c74-0e46-3d62-ab7c-5c7befabb00d[/url]


[b]15 、适当的代码提示设置[/b]
https://jingyan.baidu.com/article/5553fa82a40d9865a3393469.html

[b]16、视情况安装svn插件[/b]
建议通过eclipse marketplace
[img]http://dl2.iteye.com/upload/attachment/0130/4150/e48454ae-9612-34ae-b0ad-766f41dbc8e6.png[/img]

[b]17、 安装STS 用于spring boot开发[/b]
[img]http://dl2.iteye.com/upload/attachment/0130/4147/0485db8f-72f7-3fa9-a0f8-ff9df651da5a.png[/img]


载自我的印象笔记[url]https://www.evernote.com/shard/s170/sh/e3c36682-794d-488f-b851-6775c3b72aac/e5ecda56f2db221d[/url] ,可看到最新的改动。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值