o  # open a line below and insert
shift o  # open a line above and insert

p  # paste below
shift p  # paste above

a # append
shift a  # append at the end of the line
shift i  # insert at the beginning of the line

/ return  # search
n  # next match
shift n  # previous match
# # search the word currently hovering upward
*  # search the word currently hovering downward

f <character>  # find and jump over the next <character>
shift f <char>  # jump over the previous <char>
t <character>  # jump before the required <character>
shift t <char> # jump after the required <char>
# for f and T above
;  # repeat to next (after)
,  Move forward

x  # delete current char
s  # delete current char and go into insert mode 
shift d  # delete rest of the line
shift c  # delete rest of the line and go into insert mode
shift s  # delete the whole line and go into insert mode (indented)

d w  # delete the rest of the word 
c w  # delete the rest of the word and go into insert mode
d i w

# magic "i"
y i <char>  # yank all things inclosed by <char>
v i <char> y  # Same effect as above, but with advanced Visual Mode
d 2 i <{>  # Delete two layers of {}
c i p  # delete the paragraph
v a <{>  # Select and include {} on both sides


# moving 
gg  # go to the top
G  # go to the bottom
: <line number>  # jump to the line
<line number> G  # jump to the line
<number> j  # go down 
      
        lines
      
{  # go up to next empty line
}  # go down to next empty line
v }  # Select a paragraph
ctrl u  # up half page
ctrl d  # down half page
%  # Moving to the Matching pair (" in "DFDFDF ") is used to find the start of func
Copy the code

file

ctrl ^  # jump between recent opening two files
ctrl o  # jump back files in the history
ctrl i  # jump forward in the file history

# marks
:m<char>  # local mark
:m<CHAR>  # global mark

:Ex  # open a file tree

# relate with windows 
ctrl-w  # begin the window commands
ctrl-w (then) v  # open a vertical window
ctrl-w (then) s  # open a horizontal window
ctrl-w hjkl  # move between windows
:close  # close window
ctrl-w c  # close current window, especially useful for splited terminal
:resize some_num  # increase some_num rows, or decrease
ctrl-w =  # split windows evenly

# some other way to work with windows
:sp  # horizontal split window
:vsp  # vertical split window

# open terminal in vim
: bel[owright] ter
: vert[ical] bo[ttomright] ter

# resize window, increase/descrease current window size
:res[ize] +5
:res[ize] -5
Copy the code

fzf ctrl+p fuzzy finder plugin

Takeaway

ctr
Copy the code