--- title: 極速開發(IntelliJ IDEA) tags: xp --- 極速開發(IntelliJ IDEA) === [TOC] ## 環境 ### IntelliJ IDEA ### IntelliJ IDEA Plugin - AceJump - IdeaVim - Custom Postfix Template ### IntelliJ IDEA 設定 - 設定 ideaVim - 參考:https://blog.csdn.net/lxyoucan/article/details/114183886 - 字型調整快捷鍵 - 參考:https://www.cnblogs.com/zlslch/p/7770965.html :::info 設定好 `.ideavimrc` 檔案後,即有相對應功能 例如:相對行數 ::: - 設定 Custom Postfix Template - 參考:https://zhuanlan.zhihu.com/p/157361281 ### MAC 操作+VIM map ``` New Class: ctrl + Enter option + Enter: Fix it option + / : 補及文字 zn :GotoNextError zra :format + 測試 zsp :提取參數至上面的 function F1: 複製 function (須在空白處) nmap zcc ci" `盡量不要用` imap z; <Esc>A; ``` ### VIM 操作 ``` dw: 預期刪除 「null」 cw: `}`: end paragraph `cfn`: change f,n `cf1`: `/fif .k`: find [fif] word `Vkk`+ [ ctrl + d ]: 選取區域並貼上 `ctrl+A,ctrl+x`: 數字增減 `ca"` 刪除該行雙引號字串(包含雙引號),並以 insert mode 繼續 `ci"` 刪除該行雙引號字串(不包含雙引號),並以 insert mode 繼續 `j`: Join Line ``` ### 未完成操作 ``` Assert.equals: 使用「ae」 ``` ### 整體操作 ``` zsp F1 ``` ## 其餘 IDEA 設定 ### Live Template 設定 - jtest ``` @Test public void $action$(){ $END$ } ```   ### Postfix Completion 設定 - ea    ``` assertEquals($END$,$EXPR$); ``` :::info $EXPR$ 目標的表達式位置 $END$ 按ENTER後游標的位置 ::: :::warning 這是目前的作法,目前不確定是否有較好的做法 ::: ### MAC 在 IDEA 期間,能永遠顯示 F1~F12,不需要再一直按fn IDEA> Edit> String Manipulation> Shortcuts..  ## 待解技巧 ### 如何同時控制字串 - 讓 `"love"` 變成 `"love "`  - 讓前後參數對調  ## 其他資訊 ### Windows vs Mac - alt vs option - ctrl vs command - https://stackoverflow.com/questions/2249494/how-do-i-create-a-new-class-in-intellij-without-using-the-mouse ### vim 技巧 - [暫存器](https://www.796t.com/p/200345.html) - [CR](https://stackoverflow.com/questions/22142755/what-is-the-meaning-of-a-cr-at-the-end-of-some-vim-mappings) ### 參考 - [Ken(Day3)](https://www.youtube.com/watch?v=mps12oI6k_4) - [91極速開發 - tennis v4 by IntelliJ](https://www.youtube.com/watch?v=LA7dgej1_48&t=11s)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up