IDEA
//
==========================================
idea配置优化 /Applications/IntelliJ\ IDEA.app/Contents/bin/idea.vmoptions
或者help - Edit custom VM options
-Xms512m
-Xmx512m
-Xmn164m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-Xverify:none
-Xnoclassgc
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=85
-ea
-Dsun.awt.keepWorkingSetOnMinimize=true
-Duser.name=sunchenguang
默认配置
-Xms128m
-Xmx1024m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=225m
-XX:+UseCompressedOops
-Duser.name=sunchenguang
==========================================
常用快捷键:
mac 下 ctrl ===> command
快捷键修改 keymap Eclipse (mac x os) copy copy
windows下 file - setting - keymap - other - class name completion
1.需要自定义快捷键:
当前文件查找: ctrl+f
jump to source: command+t
replace: command+r
class name completion: shift+space
*设置鼠标操作 Add mouce shoutcut -- 按住command 然后鼠标点击 就设置了此快捷键
quick documentation(快速看文档): command + 鼠标点击
实现类 implementation(s): command+i
general --- show quick documentation on mourse movie 勾选上 会鼠标放在方法等上面显示提示 在显示的提示层上 取消【大头钉】这样就会在方法上面显示(类似于quick define定义的快捷键功能 )
2.已存在快捷键
格式化: ctrl+shift+f
删除行: ctrl+d
全局查找: ctrl+h
全选: shift+fn+ 左右方向键
快速outline: ctrl+o
全局快速outline: ctrl+shift+r
将一行上下移动: alt+上下方向键
当前页生成: alt+insert
生成方法 ctrl+n
最近打开的文件: command+e
计算表达式: command + u
find usages: shift+command+g
back: command + [ command + ]
全局搜索(包括jar 各种文件):点击两次shift
行信息:command+L
quick define快速查看详情:command+y
command + z <==> command + shift +z
快速生成(for trycatch…) 选中代码 alt+command+z
==========================================
修改模板:
Preferences->Editor->File and Code Templates,然后在include这个tab下File header 粘贴模板
${USER}
1.不配置-Duser.name读取系统登陆用户名
2在/Applications/IntelliJ\ IDEA.app/Contents/bin/ 添加配置-Duser.name
读取此配置的值
/**
* USER: ${USER}
* TIME: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
* COMMENT:
*/
/**
* 标题、简要说明. <br>
* 类详细说明.
* <p>
* Copyright: Copyright (c) ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
* <p>
* Company: 公司
* <p>
*
* @author ${USER}
* @email ${USER}@123.com
* @version 1.0.0
*/
==========================================
打可执行jar包:
File - Project Structure - Artifacts - + - ok
Build - Build Artifacts - Build
==========================================
设置行号:
Preferences - Editor -Appearance->Show line numbers
设置代码提示忽略大小写:
Preferences - Editor - General - Code Completion - Case Sensitive completion (none)
取消代码拼写检查:
Settings->Inspections > Spelling > Typo
去掉indent提示(ok indent with 4 spaces show settings):
editor - code style - 去掉如下勾选 Detect and use existing file indents for editing
修改背景色:
Preferences - Appearance & Behavior - Appearance - Thene
设置自动回收import :
Preferences - Editor - General - Auto import java下全部勾选 apply ok
设置自动换行 :
Preferences - Editor - code style - line separator(unix ans osx)
right margin:120
关闭IDEA的使用习惯统计:
File -> Settings -> Appearance & Behavior -> System Settings -> Usage Statistics -> 去掉 Allow sending
关闭自动更新:
Preferences - Appearance & Behavior - System Settings - updates
设置自动保存:
File -> Settings -> Appearance & Behavior -> System Settings -> Synchronization 标签项 ->
全部勾选包括 Save files automatically 设置30 sec.
禁用插件:
File -> Settings -> Plugins -> 如:ASP、Cloud Foundry integration、CloudBees integration、CVS Integration、Flash/Flex Support、TFS Integration、Google App Engine Integration
===============================================================
安装插件
Prerference - plugins - install jetbrains
添加插件
1.setting→plugins→Browse repositories
2.输入lom后选择install plugin
GsonFormat: command + N 选择 gsonformat 输入json格式数据 format 会生成pojo
CodeGlance:代码右侧地图
Maven Helper:打开 pom 文件 左下角 Dependency Analyzer 选项
==========================================
注解编译:
Setting - Compiler - Annotation Processors - Enable annotation processing.
选中,clean后再次编译即可
自定义Task(TODO)标签
preference -> Editor -> TODO
发现已有两个标签:
\btodo\b.* ---- 对应TODO
\bfixme\b.* ---- 对应FIXME
点加号可以添加自定义的TODO标签,如:
\bxxx\b.* ---- 对应XXX
==========================================
清理jar包依赖
pom.xml打开 在空白处 右键 show dependencis 看到依赖tree 删除依赖 会自动生成
<exclusions>
<exclusion>
<artifactId>**</artifactId>
<groupId>**</groupId>
</exclusion>
</exclusions>
==========================================
修改idea包名
打开一个类 如com.cheyipai.mobile 双击车易拍 右键refector rename
修改项目
导入maven项目 清理项目 留下pom.xml src sql
1.修改pom.xml 都修改成新项目名称
2.选择import project
3.import project form external model —>Maven
4.选择beta dev product
5.file—> project structure 都修改成新项目名称
6.maven启动命令
==========================================
clean package -Pdev org.eclipse.jetty:jetty-maven-plugin:9.2.3.v20140905:run
maven jetty 启动 clean package -Pdev jetty:run -DCATALINA_BASE=c:\
注: jetty添加另一种方式
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.16.v20140903</version>
</plugin>
</plugins>
</build>
clean package -Pdev -Djetty.port=9999 jetty:run
rm -fr CarOrderWeb.iml
rm -fr .idea/
mvn idea:idea
==========================================
pycharm:
preferences --- project:python --- project interceptor 选择编译器
配置其他 同idea
==========================================
==========================================
//
==========================================
idea配置优化 /Applications/IntelliJ\ IDEA.app/Contents/bin/idea.vmoptions
或者help - Edit custom VM options
-Xms512m
-Xmx512m
-Xmn164m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-Xverify:none
-Xnoclassgc
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=85
-ea
-Dsun.awt.keepWorkingSetOnMinimize=true
-Duser.name=sunchenguang
默认配置
-Xms128m
-Xmx1024m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=225m
-XX:+UseCompressedOops
-Duser.name=sunchenguang
==========================================
常用快捷键:
mac 下 ctrl ===> command
快捷键修改 keymap Eclipse (mac x os) copy copy
windows下 file - setting - keymap - other - class name completion
1.需要自定义快捷键:
当前文件查找: ctrl+f
jump to source: command+t
replace: command+r
class name completion: shift+space
*设置鼠标操作 Add mouce shoutcut -- 按住command 然后鼠标点击 就设置了此快捷键
quick documentation(快速看文档): command + 鼠标点击
实现类 implementation(s): command+i
general --- show quick documentation on mourse movie 勾选上 会鼠标放在方法等上面显示提示 在显示的提示层上 取消【大头钉】这样就会在方法上面显示(类似于quick define定义的快捷键功能 )
2.已存在快捷键
格式化: ctrl+shift+f
删除行: ctrl+d
全局查找: ctrl+h
全选: shift+fn+ 左右方向键
快速outline: ctrl+o
全局快速outline: ctrl+shift+r
将一行上下移动: alt+上下方向键
当前页生成: alt+insert
生成方法 ctrl+n
最近打开的文件: command+e
计算表达式: command + u
find usages: shift+command+g
back: command + [ command + ]
全局搜索(包括jar 各种文件):点击两次shift
行信息:command+L
quick define快速查看详情:command+y
command + z <==> command + shift +z
快速生成(for trycatch…) 选中代码 alt+command+z
==========================================
修改模板:
Preferences->Editor->File and Code Templates,然后在include这个tab下File header 粘贴模板
${USER}
1.不配置-Duser.name读取系统登陆用户名
2在/Applications/IntelliJ\ IDEA.app/Contents/bin/ 添加配置-Duser.name
读取此配置的值
/**
* USER: ${USER}
* TIME: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
* COMMENT:
*/
/**
* 标题、简要说明. <br>
* 类详细说明.
* <p>
* Copyright: Copyright (c) ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
* <p>
* Company: 公司
* <p>
*
* @author ${USER}
* @email ${USER}@123.com
* @version 1.0.0
*/
==========================================
打可执行jar包:
File - Project Structure - Artifacts - + - ok
Build - Build Artifacts - Build
==========================================
设置行号:
Preferences - Editor -Appearance->Show line numbers
设置代码提示忽略大小写:
Preferences - Editor - General - Code Completion - Case Sensitive completion (none)
取消代码拼写检查:
Settings->Inspections > Spelling > Typo
去掉indent提示(ok indent with 4 spaces show settings):
editor - code style - 去掉如下勾选 Detect and use existing file indents for editing
修改背景色:
Preferences - Appearance & Behavior - Appearance - Thene
设置自动回收import :
Preferences - Editor - General - Auto import java下全部勾选 apply ok
设置自动换行 :
Preferences - Editor - code style - line separator(unix ans osx)
right margin:120
关闭IDEA的使用习惯统计:
File -> Settings -> Appearance & Behavior -> System Settings -> Usage Statistics -> 去掉 Allow sending
关闭自动更新:
Preferences - Appearance & Behavior - System Settings - updates
设置自动保存:
File -> Settings -> Appearance & Behavior -> System Settings -> Synchronization 标签项 ->
全部勾选包括 Save files automatically 设置30 sec.
禁用插件:
File -> Settings -> Plugins -> 如:ASP、Cloud Foundry integration、CloudBees integration、CVS Integration、Flash/Flex Support、TFS Integration、Google App Engine Integration
===============================================================
安装插件
Prerference - plugins - install jetbrains
添加插件
1.setting→plugins→Browse repositories
2.输入lom后选择install plugin
GsonFormat: command + N 选择 gsonformat 输入json格式数据 format 会生成pojo
CodeGlance:代码右侧地图
Maven Helper:打开 pom 文件 左下角 Dependency Analyzer 选项
==========================================
注解编译:
Setting - Compiler - Annotation Processors - Enable annotation processing.
选中,clean后再次编译即可
自定义Task(TODO)标签
preference -> Editor -> TODO
发现已有两个标签:
\btodo\b.* ---- 对应TODO
\bfixme\b.* ---- 对应FIXME
点加号可以添加自定义的TODO标签,如:
\bxxx\b.* ---- 对应XXX
==========================================
清理jar包依赖
pom.xml打开 在空白处 右键 show dependencis 看到依赖tree 删除依赖 会自动生成
<exclusions>
<exclusion>
<artifactId>**</artifactId>
<groupId>**</groupId>
</exclusion>
</exclusions>
==========================================
修改idea包名
打开一个类 如com.cheyipai.mobile 双击车易拍 右键refector rename
修改项目
导入maven项目 清理项目 留下pom.xml src sql
1.修改pom.xml 都修改成新项目名称
2.选择import project
3.import project form external model —>Maven
4.选择beta dev product
5.file—> project structure 都修改成新项目名称
6.maven启动命令
==========================================
clean package -Pdev org.eclipse.jetty:jetty-maven-plugin:9.2.3.v20140905:run
maven jetty 启动 clean package -Pdev jetty:run -DCATALINA_BASE=c:\
注: jetty添加另一种方式
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.16.v20140903</version>
</plugin>
</plugins>
</build>
clean package -Pdev -Djetty.port=9999 jetty:run
rm -fr CarOrderWeb.iml
rm -fr .idea/
mvn idea:idea
==========================================
pycharm:
preferences --- project:python --- project interceptor 选择编译器
配置其他 同idea
==========================================
==========================================