移动光标
30 move to the beginning of the line # $ The end of the current row # GG file The first line # G file last line # line number +<ctrl>+<ctrl> +i return to the position before the jump
退出
# <esc> Enter normal mode #: Q! do not save exit #: Wq after saving
删除
# x Delete current character # DW Delete to current word end # de Delete to current word end, including current character # d$ Delete to current line end # DD Delete whole line # 2DD Delete two rows
修改
# i insert text # at the end of the current line add # R to replace the current character # O open a new line and enter insert mode
撤销
<ctrl>+r Cancel Revocation
复制粘贴剪切
# V into visual Mode # y copy # p paste # yy copy current line # DD cut when forward
状态
# <CTRL>+G Displays the current line and file information
查找
#/% lookup pairing {, [, (#:set IC ignores case #:set noic de-ignores case #:Set c7> HLS Match Highlighting #:set is display partial match
替换
#: s/old/new replaces the line with the first matching string #: s/old/new/G replaces the entire line of the matching string #:%s/old/New/ G Replace the entire file with a matching string
执行外部命令
#:!shell Execute external command
. VIMRC
http://blog.jobbole.com/112726/
Reference
http://blog.jobbole.com/112726/
Vim shortcut keys