LVM 實踐操作
常用快捷鍵設定(設定成跟Eclipse差不多)
按照路徑:File -> Settings -> Appearance & Behavior -> Keymap -> Copy 一份 Eclipse,命名為 Eclipse_blog.snsgou.com
快捷鍵 | 功能 | 路徑 |
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 |
弱弱的補充說明一下:
新買了一臺ThinkPad E440,儘管關閉/禁用了 螢幕的快捷鍵Ctrl + Alt + ↓,但是在 InterlliJ IDEA中這組快捷鍵還是不能用,沒辦法,最後換成了新的組合鍵Ctrl + Alt + PageDown。
2、File -> Settings -> Appearance & Behavior
(1).->Appearance -> Theme -> 下拉選擇Alloy.IDEA Theme
(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 -> 去掉勾選 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、禁用一些(不想用的)外掛
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
游標所在行背景顏色
Editor – Colors&Fonts – General – Caret row,選擇了藍色背景,這樣就有了較大的色差。
- 在
General
區,我常修改的有: Default text
,指的是預設程式碼文字,我一般會修改其Background
屬性。Caret row
,指的是游標所在行,我一般會修改其Background
屬性。Vertical indent guide
,指的是垂直縮排線,我一般會修改其Foreground
屬性。Identifier under caret
,指的是游標所在位置的相同識別符號呈現什麼效果,我一般會修改其Background
屬性。Text search result
,指的是在查詢模式下,匹配字元的樣式,我一般會修改其Background
屬性。
注意事項:
在主選單 File下面,有個奇怪的Power Save Mode,顧名思義是省電模式。當你勾選此模式以後,IntelliJ不會給你完成任何自動完成的功能,例如本來你輸入一個字元會自動提示的,勾選以後就沒有了,如果出現此問題的話可以考慮是不是自己手賤點過這個按鈕噢,這個還是比較適合開會的時候無聊看程式碼用的,又省電又不影響你看程式碼。
轉載於:https://my.oschina.net/boltwu/blog/410883