The 1.:s command to replace the string.
Replace the current row the first Vivian for Sky:s/vivian/sky/G replaces the current line with all Vivian as Sky:n, $s replace the nth row to start with the first VI of each row in the last row Vian for sky:n, $s
2.N is a number, if N is., which indicates the start of the current line to the last row
:%s/vivian/sky/(equivalent to: G/VIVIAN/S// :%s/vivian/sky/g (equivalent to: G/VIVIAN/S// sky/g) Replace all Vivian in each row as Sky
3. You can use # as a delimiter, at which time the middle appears/does not act as a delimiter
: s#vivian/#sky/# Replace the current line the first vivian/is sky/ :
4. Replacement Confirmation
there are many times when a character (string) is required to be replaced in some position in the article, while other locations are not replaced by a selective operation, which requires the user to confirm, and the same support for the search substitution of VI For example: s/vivian/sky/G replaces the current line all Vivian for Sky in the command after the addition of a letter C can be achieved, that is: s/vivian/sky/gc as implies meaning, C is the abbreviation of Confirm
Vim Find/Replace string