Vim Editor improves

Source: Internet
Author: User

    • Verb

The verb represents what we intend to do with the text. For example:

D means delete deletes
R indicates replacement replace
C means modify change
Y means copy Yank
V indicates that the visual select is selected


    • Noun


Nouns represent the text we are about to process. There is a special term in Vim called a text object, and here are some examples of text objects:

W represents a word word
s represents a sentence sentence
P represents a paragraph Paragragh
T represents an HTML tag tag
The quotation marks or the text contained in the various parentheses are called a block of text.


    • Prepositions


Prepositions define the range or position of the text to be edited. For example:

I mean "in ... Within "inside
A means "wrapping ..." around
T means "to ... Position front "to
F means "to ... Location "forward

Here are a few of the areas that you should feel:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/32/wKiom1b5B7KjJEBdAACFFKkIWb8165.jpg "style=" background-color:inherit;margin-top:8px;height:282px, "width=" "height=" 260 "alt=" Wkiom1b5b7kjjebdaacffkkiwb8165.jpg "/>


Group words as Sentences


With these basic language elements, we can begin to construct some simple commands. The basic syntax for text editing commands is as follows:

Verb prepositions nouns


# Remove a paragraph: Delete inside paragraph

Dip

Spacing between paragraphs and paragraphs with blank behavior


# Select a sentence: Visual select inside sentence
Vis


# Modify a Word: change inside word
Ciw


# Modify a word: change around word
Caw


# Copy a word: Yank a Word

Yiw


# copy some words: Yank to X

Ytx


# Delete text until the character "X" (excluding the character "X"): Delete to X
Dtx


# Delete text until character "X" (including character "X"): Delete forward X
Dfx


Numerals


Numerals specify the number of text objects to be edited, and from this point of view, numerals can also be regarded as a preposition. After the introduction of the numeral, the syntax of the text Editing command is escalated to the following:

Verb prepositions/numeral nouns

Here are a few examples:

# Modify three words: change three words
c3w
# Delete Two words: delete two words
B21


In addition, the numeral can also modify the verb, indicating that the operation is performed n times. So, we have the following syntax:

numeral verb noun

Take a look at the example:

# Two deletion of words (equivalent to deleting two words): twice delete word
2dw
# three Delete characters (equivalent to delete three characters): three times Delete character
3x



From for notes (Wiz)



Vim Editor improves

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.