Last active
August 29, 2015 14:07
-
-
Save chichunchen/da9b25b652016049b472 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 補齊括弧 | |
" 語法 | |
" inoremap triger_char mapping_str | |
" 映射指令 觸發字元 映射字串 | |
" | |
" 註:<LEFT> 為向右鍵字元 | |
inoremap ( ()<LEFT> "小括號補齊,並將輸入游標左移一個字元 | |
inoremap [ []<LEFT> "中括號補齊,並將輸入游標左移一個字元 | |
inoremap { {}<LEFT> "大括號補齊,並將輸入游標左移一個字元 | |
inoremap ' ''<LEFT> "單引號補齊,並將輸入游標左移一個字元 | |
inoremap " ""<LEFT> "雙引號補齊,並將輸入游標左移一個字元 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec command: | |
:!(any command // this will execute the commmand in terminal and then back to vim | |
append: | |
a: insert before cursor | |
i: insert after cursor | |
A: insert at the end of line | |
I: insert at the begin of line | |
move: | |
H: to head | |
M: to middle | |
L: to last | |
learn from: http://blog.winwu.today/2013/08/vim.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cut and paste: | |
Position the cursor where you want to begin cutting. | |
Press v (or upper case V if you want to cut whole lines). | |
Move the cursor to the end of what you want to cut. | |
Press d to cut or y to copy. | |
Move to where you would like to paste. | |
Press P to paste before the cursor, or p to paste after. | |
Copy and paste can be performed with the same steps, only pressing y instead of d in step 4. | |
The name of the mark used is related to the operation (d:delete or y:yank). | |
I found that those mark names requires minimal movement of my finger. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment