NOTE
vim
1. vim Modes normal insert: i insert before the cursor I insert at the beginning of the line a insert after the cursor A insert at the end of the line o insert on the next line O insert on the previous line insert normal: ESC normal< visual: v normal
This is a historical learning note and may contain outdated or incomplete understanding.
1. vim Modes
normal->insert: i insert before the cursor I insert at the beginning of the line a insert after the cursor A insert at the end of the line o insert on the next line O insert on the previous line
insert->normal:
ESC
normal<->visual:
v
normal->command: :; for example, 15 jumps to line 15
2. Cursor Movement
Up, down, left, right: hjkl 15G jump to line 15 5J jump down 5 lines
Within a line:
f search for a character forward, F search for a character backward Use with ; for the next match and , for the previous match
Words: w beginning of the next word, e end of the next word, b beginning of the previous word
Beginning/end of line: ^ end of this line $ end of this line
G last line gg first line
3. Operators and Motions
3.1. Operators
d: delete
y: copy
c: change
v: select and enter visual mode
3.2. Motions
i: inner a: around
3.3. Combinations
iwXXX inside XXX awXXX inside XXX (including XXX) cs”’ change “ to ’ ds” delete “ ysiw” add ” ~ toggle case
4. Other Features
4.1. Case
~: uppercase
4.2. Navigation
ge jump to definition gh show hover
alt+o alt+i back forward
alt+1 file panel; press L to go to the editor panel
alt+2 search
alt+3 outline
alt+4 terminal; hold ctrl+1 to enter the editor panel
ctrl+1 tab in the first split, ctrl+2 tab in the second split
4.3. Search
/search n next N previous zc fold brackets, zo unfold brackets
5. Plugins
5.1. easymotion
space space enters easy motion mode
5.2. surround
This plugin adds an action s, namely surround.
If 'test aaa' should change the single quotes to double quotes, use cs'" , meaning change surround single quote double quote.
6. References
Efficient Development with VS Code + Vim - D Zhiguang’s Blog - CSDN
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub