PHP Programming tools Vim Shortcuts Guide

Source: Internet
Author: User
Keywords PHP programming tools shortcuts
Tags aliyun beginners beginning control delete file guide html

In order to facilitate the use of VIM, and enable beginners to quickly start, special from the online summary of some of the common Vim shortcut keys, to share with you:

VI Common shortcut keys
Cursor Control command
Command &http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; Cursor movement
h or ^h to move one character to the left
J or ^j or ^n down one line
K or ^p move up one line
L or space move one character to the right
G move to the last line of the file
NG moves to the nth line of a file
W moves to the beginning of the next word
W moves to the beginning of the next word, ignoring punctuation
b move to the beginning of the previous word
B move to the beginning of the previous word, ignoring punctuation
L move to the last line on the screen
M moves to the middle line of the screen
H move to the first line of the screen
e move to the end of the next word
E moves to the end of the next word, ignoring punctuation
(move to the beginning of a sentence
) move to the end of the sentence
{Move to the beginning of a paragraph
Move to the beginning of the next paragraph
0 or | Move to the first column of the current row
n| Move to the nth column of the current row
^ Move to the first non-null character of the current line
$ move to the last character of the current line
+ or return to the first character in the next line
-Moves to the first non-null character on the previous line

Add text to VI
Command Insert Action
A inserts text after the cursor
A inserts text into the current line
I insert text before the cursor
I insert text before current line
o Inserts a new row below the current line
O inserts a new row above the current line
: R file reads the filename and inserts it behind the current line
: Nr file reads the file contents and inserts it into the nth line
Escape back to Command mode
^v char insertion ignores the specified meaning of char in order to insert special characters

Delete text in VI
Command Delete operation
x deletes the character at the cursor, plus the number of characters you need to delete before X
NX Remove n characters from the current cursor
x deletes the characters before the cursor, adding the number of characters you want to delete before X
NX deletes n characters forward from the current cursor
DW deletes to the beginning of the next word
NDW delete n words from the current cursor
DG, delete the line until the end of the file
DD Deletes entire row
NDD Delete from current line
DB Delete the word in front of the cursor
NDB Remove n Word from current line
: N,md from line m to delete n line
D or d$ from the cursor at the end of the line
Dcursor_command Delete to Cursor command, such as DG will be removed from the line to the end of the file
Delete the preceding character when ^h or backspace insert
^w inserts, deletes the preceding word

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.