Begin to feel the magic of Vim I guess
e
/E
: go to the end of this word/Wordge
/gE
: reverse ofe
/E
0
/$
: go to the start/end of the line^
: go to the first non-blank char of lineg0
/g$
/g^
: similar to0
/$
/^
, but targeting a wrapped linegg
/G
: jump to the start/end of the file<Number>G
/<Number>gg
: jump to nth line
x
/X
: cut the char under/after cursors
/S
: cut the char under/after cursor and enter insert moder
: replace the char under cursorR
: enter replace modea
: append(insert) after cursorI
/A
: insert/append(**insert before/after) the lineo
/O
: open a new line below/above and enter insert mode- *
<<
: add a indent to current line - *
>>
: remove a indent from current line v
: enter visual(select) mode to select part of code, then usey
to yank(copy) the selected code
Ctrl+n
/Ctrl+p
: select next/previous option in autocomplete or trigger default autocomplete behaviorCtrl+w
: delete word before cursor
press <enter> after typing
:w <fileName>
: overwrite/create fileName:q!
force quit without savingZZ
: save and quit (=:x
=:wq
)ZQ
: force quit without saving (=:q!
)/<pattern>
: search patternctrl-l
: to refresh (can be used to clear searching highlights)