分享

IntelliJ IDEA初始化配置

 dabinglibrary 2015-10-10


idea在线激活地址:http://appcode./key

如何显示行号:Settings->Editor->General->Appearance标签项,勾选Show line numbers

如何让光标不随意定位:Settings->Editor->General中Virtual Space去掉Allow placement of caret after end of line

创建类注释,看

创建jsp文件注释修改(其实和修改类注释是同一个地方,找一下就找到了)
 
 

用*标识编辑过的文件

菜单:File->Settings->Editor->General->Editor Tabs:

勾选:Mark modified tabs with asterisk


编码格式:

  
 

按照路径:File -> Settings -> Keymap -> Copy 一份 Eclipse,命名为 Eclipse_blog.snsgou.com



补充说明一下快捷键:

Move Line Down    Alt+向下箭头
Move Line Up         Alt+向上箭头

Split Line                                        Ctrl+Enter
Start New Line                               Shift+Enter
Start New Line Before Current      Ctrl+Shift+Enter



1、 File > Settings > Apperence 》theme里选择 Darcula, Editor->colors&font->general    

Scheme:Darcula 把background勾上 

    配置JDK:  File-->Project Structure: project SDK--New a jsdk.


2、File -> Settings -> Appearance & Behavior

(2).-> Appearance -> 勾选 Orerride default fonts by(not recommended):
            Name: 微软雅黑    Size:12    Line spacing: 1.2
(3).-> Appearance -> Window Options -> 去掉勾选 Animate windows,勾选 Show tool window bars
(4).-> Appearance -> Presentation Mode -> Font size: 24
(5).-> Menus and Toolbars -> Main Toolbar -> 把 Synchronize 移到 Redo 的后面
(6).-> Menus and Toolbars -> Main Toolbar -> Rmove 掉 Help Topics
(7).-> System Settings -> Startup/Shutdown -> 去掉勾选 Reopen last project on startup,去掉勾选 Confirm application exit
(8).-> System Settings -> Project Opening -> 勾选 Open project in the same window
(9).-> System Settings -> Synchronization -> 全部勾选,并且 Save files automatically if application is idle for 3 sec.
(10).-> System Settings -> Updates -> 去掉勾选 Automatically Check for updates in channel
(11).-> System Settings -> Usage Statistics -> 去掉勾选 Allow sending usange statistics to JetBrains s.r.o.

 

3、File -> Settings -> Editor

(1).-> General -> Mouse -> 勾选 Change font size (Zoom) with Ctrl + Mouse Wheel
(2).-> General -> Virtual Space -> 勾选 Show virtual spaces at file bottom
(3).-> General -> Scrolling -> 去掉勾选 Smooth scrolling
(4).-> General -> Other -> Srip trailing spaces on Save,下拉选择 All
(5).-> General -> Smart Keys -> 去掉勾选 Backspace smart indent
(6).-> General -> Smart Keys -> 去掉勾选 Reformat block on typing '}'
(7).-> General -> Smart Keys -> Reformat on paster: 选择 None
(8).-> General -> Appearance -> 勾选 Show line numbers
(9).-> General -> Appearance -> 勾选 Show whitespaces
(10).-> General -> Editor Tabs -> Tab Closing Policy -> Tab limit: 20

(19).-> General -> Editor Tabs -> 勾先 Mark modified tabs with asterisk 用*在Tab标签中标识编辑过的文件(新添加)

(11).-> General -> Code Folding -> 去掉勾选 One-line methods
(12).-> General -> Code Completion -> Case sensitive completion -> 下拉选择 None 【去除自动补全时,大小写敏感
(13).-> General -> Code Completion -> 勾选 Autopopup documentation in (ms): 200
(14).-> General -> Code Completion -> Parameter Info -> 勾选 Autopopup in (ms): 200

(15).-> Inspections -> 下拉框选择“Default” -> Spelling -> Typo -> Options ->【关闭单词拼写检查

 去掉勾选 (a)Process code (b)Procss literals (c)Process comments

(16).-> Colors & Fonts -> Scheme name -> Copy 一份 Default,并命名为 blog.snsgou.com
(17).-> Colors & Fonts -> Font -> Editor Font -> Primary font: Courier New,Size: 14,Line spacing: 1.0

(18).代码块颜色主要参考了 Eclipse,并做了些小修改

-> Colors & Fonts -> Font
-> Colors & Fonts -> Font -> General
-> Colors & Fonts -> Font -> Language Defaults
-> Colors & Fonts -> Font -> Java
-> Colors & Fonts -> Font -> Java -> JavaDoc tag value代码样本中根本没有这货!把我害苦了,找了好久】 -> Foreground: #3F55BF

 (20). 我过滤的文件及目录类型

->File Types -> Ignore files and folders 

添加 *.iml;*.idea;*.classpath;*.project;*.settings;target;


4、File -> Other Settings -> Default Settings -> Build, Execution, Deployment

(1).->Compiler -> 勾选 Make profect automatically【自动编译

 

5、禁用一些(不想用的)插件

maven--setting-05.jpg

File -> Settings -> Plugins ->  去掉勾选:

Git Integration

GitHub

CVS Integration

TFS Integration

Flash/Flex Support

Google App Engine Integration

IDEtalk

ASP

Cloud Foundry integration

CloudBees integration

 

6、最后记得备份一下“个性化设置”:

File -> Export Settings


2.优化JVM参数

进入idea安装目录的bin目录下,找到idea.exe.vmoptions(64位的,编辑idea64.exe.vmoptions)文件:

-Xms256m
-Xmx1024m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=128m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true


-Xms256m设置初时的内存数,你需要设置一个合理的值, 增加该值可以提高Java程序的启动速度。如果你的内存够大,如2G,可以设置到400m。
-Xmx1024m设置最大内存数,提高该值,可以减少内存Garage收集的频率,提高程序性能。


快捷键功能路径
Ctrl + /双斜杠注释Main menu -> Code -> Comment width Line Comment
Ctrl + Shilft + /块注释Main menu -> Code -> Comment width Block Comment
Alt + /代码提示Main menu -> Code -> Completion -> Basic 
Ctrl + I格式化代码Main menu -> Code -> Reformat Code
Ctrl + D删除当前行Editor Actions -> Delete Line
Ctrl + E最近打开的文件列表Main menu -> View -> Recent Files
Ctrl + W关闭正在编辑的活动窗口。Main menu -> Window -> Editor Tabs -> Close
Ctrl + F搜索、替换Main menu -> Edit -> Find -> Replace
Ctrl + H高级查找Main menu -> Edit -> Find -> Find in Path
Ctrl + L定位到指定行Main menu -> Navigate -> Line
Ctrl + Alt + PageDown
Ctrl + Alt + PageUp
复制当前行到下(上)一行中。比Ctrl+C单纯的复制功能要方便好用(省掉了粘贴步骤),主要是用在编写代码时,需要移动代码的地方。Editor Actions -> Duplicate Lines
Alt + ↓
Alt + ↑
移动单行(多行)代码。也是比Ctrl+C更好的快捷键。Main menu -> Code -> Move Statement Down

Main menu -> Code -> Move Statement Up
Ctrl + Shift + R根据文件名(模糊查询)快速定位文件(任何类型)Main menu -> Navigate -> File
Ctrl + Shift + U大小写转换Main menu -> Edit -> Toggle Case
F1查看文档Main menu -> View -> Quick Documentation
F2重命名Main menu -> Refactor -> Rename
Ctrl + I格式化代码Main menu -> Code -> Reformat Code

 



 




    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多