Network Security Training (2)

Get data vim editor
needs to be in command mode
/ key_word looking after the cursor in the first occurrence of keywords
hold the key will search for the next n Keywords
 
:% s / key1 / key2 all documents each line of the first occurrences replaced key1 key2
:% S / key1 / key2 / g replace all key1 to key2
: S / key1 / key2 key1 replaces the first occurrence of the current line to key2
: S / key1 / key2 / g current All row replaced key1 key2

VIM other operating (command mode)
X deleted after the cursor one character  
X Delete preceding the cursor one character
dd delete the line where the cursor
ndd delete the cursor n lines
yy copy cursor line
data p to paste the copied to the next line of the cursor
P will paste the copied data to the cursor line
u undo the last action

Guess you like

Origin www.cnblogs.com/yanggenb/p/11525015.html