1, replacing
1.1 basis
The format is::[range]s/pattern/string/[c,e,g,i]
can range values:
- n, $ - n-th row to the last row
- ., $ - the current line to the last line
- % - each row
option possible values:
- c confirm, Ask before each replacement.
- e is not displayed error.
- g globe, without asking, replace a line.
- i ignore not case-sensitive.
2, multi-window editing
Divided up and down the window -
:split [文件]
About dividing window -
:vsplit [文件]
-
Window switch:
- ctrl + wj moved downwardly
- ctrl + wk moved upwardly
- ctrl + wh leftward
- ctrl + wl move right
- ctrl + wt moved to the top of
- ctrl + wb mobile terminal in the end
- Ctrl + w + r: right or downward exchange window, and Ctrl + w + R and the direction opposite to it.
- Ctrl + w + x: exchange positions with counterparts column or window. vim with its default next window position switching current window, if no window below, and then try to exchange a position on a window. Before this command can also add the number, location and windows exchange developed.
Reproduced in: https: //www.jianshu.com/p/7ab3e74ea0dd