Sometimes tools are too powerful, but getting started is difficult.
Vim Command Daquan
This is the existence of VIM .
In order to exercise the ability of the naked eye to debug and write the correct code, I decided to write code with a text editor.
Because the main problem is to write ACM at this stage, it does not use special advanced features.
1. Configuration
打开配置文件 vim ~/.vimrcset nocompatibleset backspace=indent,eol,startset cursorlinesetonset tabstop=4set shiftwidth=4colo eveningset mouse=aset cin使用 g++ A.cpp -o A./A
When editing, you will be able to make simple commands.
Move
HJKL Lower left upper right
W e W e b b The next word first (tail) next string header (tail) the first string of previous words
In line 0 ^ $ g_
Between rows GG NG
Sentence () previous sentence (end) {} Last paragraph (tail)
Copy y
Delete D
Paste P
Find * #/pattern
Replace
: [Range]s/pattern/string/[c,e,g,i]
% represents global 1,10 1 to 10 rows g means that the row is all replaced
\ < Sky \ > Only replace Sky does not consider the internal situation of Askyaa
If it is only delete//
Replace
Comment Block selection I//ESC
Layout block selection =
Introduction to VIM (ACM version)