copy and paster
- v/ctrl+v start copy
- d/y: copy choosed
- p: paster
- yy/Y :copy a line
- y^ :form point copy to line head
- y$ :from point copy to line end
- yG :copy to document end
- ygg :copy to document head
- p :copy to point behined
- P :copy to point before
- . :copy
point move
k
h l
j
- a line home to end
- 0 to line home
- shift+^ to line home
- shift+$ to line end
- word move
- w/W next word first letter
- e/E next word last letter
- b/B prev word first letter(reverse of w/W)
- document head/foot
- gg to head
- G to foot
- go to line
- :n like :22 to line 22
- page down/up
- ctrl+f
- ctrl+b
i-mode
- i : insert
- a : append
- o : create next new line
- I : insert ,and point to line head
- A : append ,and point to line end
- O : create prev new line
delete or revert
- x/X: x -> del ;X->back space
- dd: delete one line
- dgg: delete to documnt head
- dG :delete to documnt end
- D : form point to delete to line end
- d0 : from point to delete to line head
- u : revert
- ctrl+r :revert u
replace
- r : replae one letter
- R : relpce always until enter Esc
- cw : replace a world
- cc : replace a line
with num
- 5dd: delete 5 line
- 5x: del 5 char
- 5X: back space 5 char
tab
- shift+>>
- shift+<<
- :ce center
- :ri right
- :le left
query
- / or ? : / find down ,? find up
- n or N : n find next, N find prev
- shift+#/ : find current point 's word, find down,# find up
replace
:[range]s/pattern/string/[c,e,g,i]
range:
1,$ means all the document,form line 1 to end,just like %
1,7 just line 1 to line 7
pattern : regular express string : need to replace string
mark
m[a,b,1,2,3...]: to add a mark
`ma : go to mark a
'a : go to mark a line head