Vim is a powerful text editor under the Linux system. Trust the program that is familiar with the Linux development environment apes and OPS are playing well.
Here is a brief introduction of the commonly used command, I hope to help you
MACROS macro
QA: Start looking for a registered macro record
Q Start at the end of the record
@a
Multiple file multiple files editing
: E edits a file from the cache
: Bn enters next cache
: BD Delete File cache or close file
: SP FN Opens a file in a new window or opens in a cache
Commands under Windows: Ctrl+w
ctrl+w S Window Segmentation
Ctrl+w W window switch
Ctrl+w Q exit A window
Ctrl+w v Vertical Split window
Tab command
: TAB FN tab after editing file
GT next Tab
GT last Tab
: Tabr first Tab
: Tabl Last Tab
: tabm[n] Move current tab to N tab
Exit exits
: W Save
: Wq Save Exit
: x Save with Wq
: Q Exit does not save
: q! Force quit does not save
Find and replace Search/replace
/Enter a mode
?/pattern Backward Lookup mode
n repeat search for same instruction
N repeat search for opposite instructions
: s/old/new/g Replace all old content
: S/OLD/NEW/GC replace all old content with new one to ensure that each replaces
Visual modes Visual mode
1> Text Tags:
V Enter visualization mode
V begins line-oriented visualization mode
Ctrl +v start oriented block visualization mode
o Move to the end of another marker area
U Mark area converted to uppercase
O move to the corner of the other block
AW tag A word
Block of AB brackets included
AB a straight that was included in the
IB within ()
IB within {}
2> command
> = Right Shift
< = Shift Left
Y-Pull =yank
D Delete
~= switching
3> Cut and paste
DD Delete a row
DW Delete current one word
X Delete Current character
X Delete the character before the current character
D Delete the last line
YY Copy a row
2yy Copy 2 rows
YW cutting words to the clipboard
y$ cut the last line
P Paste the last line of the Clipboard current cursor
P pastes the line before the current line or cursor
]p paste the row of the Clipboard and indent it correctly.
This article is from the "Star Moon Love" blog, please be sure to keep this source http://xuegodxingyue.blog.51cto.com/5989753/1958601
Vim Editor Common commands