IDEA configuration and common shortcuts

Keyboard Shortcuts

1, Ctrl+Alt+Tthe selected code into try{}or if{}in

2, Ctrl+Orewrite method Tips

3, Alt+回车the leader packet tips

4, Alt+/the code prompt (not the default, with reference to the need to set the code of the text automatically prompts shortcut)

5. The Ctrl+Pmethod parameter hints

6, Ctrl+Alt+Lformat code

7. Ctrl+/Notes //( )

8 Ctrl+Shift+/comments /**/( )


Setup code automatically prompt shortcuts

File -> Settings -> Keymap -> Main menu-> Code -> Completion, we need to set to Basic shortcuts Alt+/, but the shortcut key is Cyclic Expand Wordoccupied, so to modify Cyclic Expand Wordthe shortcut, right Remove Alt+/. Basic and then set the shortcut keys Alt+/, right Add Keyboard Shutcut, then pressed on the keyboard Alt+/, click ok to complete the modification.


Uncomment italics

File -> Settings -> Editor -> Color Scheme-> Language Defaults-> Comments, enter the following page, the page Block comment, Text, Line commentItalic top right corner of removing the hook.


Caton resolve configuration

Increase the operating memory

IDEA 卡顿最大的问题是内存,转到 IDEA 安装目录的 bin 文件夹,32 位电脑修改 idea.exe.vmoptions 文件,64 位电脑修改 idea64.exe.vmoptions 文件, idea64.exe.vmoptions 文件内容如下:

-Xms128m
-Xmx512m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow

修改为

-Xms256m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow

具体数值修改多少,根据自己电脑内存调整,Xms 为运行的最小内存,Xmx 为最大内存。

取消文件自动保存

Settings -> Appearance&Behavior -> System Settings, 取消 Synchronize file on frame activationSave files on framedeactivation 的选择,同时我们选择 Save files automatically, 并将其设置为 30 秒,这样 IDEA 依然可以自动保存文件,也就是在 30s 内不会帮你自动保存文件,需要手动 ctrl+s 保存,超过 30s 会自动帮你保存。

取消启动时打开上次关闭的项目

Settings -> Appearance&Behavior -> System Settings,取消 Reopen last project on startup 的选择。

Guess you like

Origin www.cnblogs.com/zongmin/p/11529570.html