Vim Shortcut Key Summary

Source: Internet
Author: User

I Insert before the cursor
A Insert after cursor
O Insert a new line down
I Insert at beginning of line
A Inserting at the end of a row
O Insert a new row up
R character to replace the cursor position with the input character
R Enter the input substitution mode
: Q Exit
: q! Force exit (do not save)
: Wq Save and exit
: X
Save and exit
: w filename Save As FileName
N1,N2 w filename N1 row to N2 row data saved as filename
H J k L Lower left top right
$ Cursor to end of line
0 Cursor to beginning of line
Gg Cursor to first line of document
G Cursor to end of document line
NG Cursor to document N line
: N Cursor to document N line
N<enter> Move n rows down
N<space> Move n characters to the right
CTRL B Previous page
Ctrl F Next page
Ctrl U Upper Half Page
Ctrl d Next Half page
Ctrl E Scroll down one line
Ctrl y Roll up a line
Zz The current row is placed in the center of the screen
Zt The current row is placed at the top of the screen
Zb The current row is set to the bottom of the screen
V The character passed by the cursor is selected
V The line passed by the cursor is selected
Y Copy
Yy Copy when moving forward
Nyy Copy 5 rows
P Paste down to one line
P Paste to Previous line
D Delete selected data
Dd Delete When moving forward
Ndd Delete N rows
Dg Delete, current line to last row
Dw Delete, current cursor to end of word
d1g Delete, first line to current line
DnG Delete, nth line to current line
D Current start Delete to end of line
X Remove 1 characters backwards
Nx Remove n characters backwards
X Delete 1 characters in a forward direction
Nx Remove N characters forward
/str Search down str from cursor position
? str Search up str from cursor position
N Find the next
N Find the previous
:%s/liao/liao/g Liaohuqiang all replaced with Liaohuiqiang
:%S/LIAO/LIAO/GC Ditto, but each one needs confirmation.
U Revoke
CTRL R Repeat a previous action
: e! Revert to document original state
Set U Show line Numbers
Set Nonu Cancel line number



Vim Shortcut Key Summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.