-
Notifications
You must be signed in to change notification settings - Fork 8
/
vim_tips.txt
40 lines (22 loc) · 1.03 KB
/
vim_tips.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
http://forum.tekgear.com/t/editing-with-vi/313
**Tip:** type capital letters without touching CapsLock or Shift
assign a chord with the following keystrokes
<Escape>~a
This sequence does the following:
- switch from insert mode to command mode (this leaves the cursor on the previously type letter)
- change the case of the letter
- switch back to insert mode (continue to type)
**Tip:** copy last word for later pasting
assign a chord with the following keystrokes
<Escape>yiw`.a
This sequence does the following:
- switch from insert mode to command mode (this leaves the cursor on the previously type letter)
- copy the word just typed (yank inner word, cursor now on the first letter of the word copied)
- return cursor to previous position
- switch back to insert mode (continue to type)
*use `p` to paste when in command mode*.
The copied word can also be stored in a named register.
# copy last word into the register a:
<Escape>"ayiw`.a
# paste the content of register a:
"ap