1. Configurations in ~/.VIMRC
Thank the enthusiastic colleague to provide the vim configuration file, really save a lot of things ~ ~
Set Shiftwidth=4set tabstop=4set nu!set mouse=aset autoindentset rulerset incsearchset smartindentset expandtabfiletype Plugin indent onset fileencodings=utf-8,gb2312,gbk,gb18030 set termencoding=utf-8 set ENCODING=PRC set ts= 4set HLS
2. Basic VIM Commands
On the internet to find a VIM Cheat Sheet, at the same time he also organized a number of common commands:
(1) Move the cursor up or down:
K H J L
(2) Next/previous prefix: w/b
(3) Next/previous ending: E/ge
(4) Jump to Beginning/end: 0/$
(5) Skip to Top/end: gg/g
(6) Slide/slide: ctrl+e/ctrl+y
(7) Next page/previous page: Ctrl+f/ctrl+b
(8) Match next/previous cursor word: */#
(9) Jump to identifier first occurrence location: GD
(10) Jump to the next <pattern> occurrence position:/<pattern>
(11) Jump to the first <pattern> where it appears:?<pattern>
(12) Find mode skip to next/previous match location: n/n
(13) Skip back to previous location: Ctrl+o
(14) Select the Word cursor: VAW
(15) Copy in Visual mode: Y
(16) larger/lower case in Visual mode: Gu/gu
(17) Copy entire: Ggyg
(18) Delete the character of the cursor (front): X (x)
(19) Insert content before/after the cursor: i/a
(20) Auto Completion in insert mode: ctrl+p
(21) Insert one line below/above the cursor: o/o
(22) Delete entire line: DD
(23) Copy entire line: yy
(24) Paste: P
(25) Undo Modification: U
(26) Reply to changes: Ctrl+r
(27) Up/down/left/right Sub-window:: Split/: Vsplit
(28) up/down/left/right split window to open other files:
: SP <filename>/: VSP <filename>
(29) Exit after saving: Wq
(30) Do not save exit:: q!
VIM neophyte ' s Notes