VIM the next day-shortcut keys

Source: Internet
Author: User

Well, today is the second day of the re-learning of vim, and it has to be said that the goods are plentiful.

First to encourage yourself:

Survival (Current state)

It feels good.

Feel better, stronger, faster

Eat with VIM super ability

Vimtutor practice to Lesson 7, a little summary, mainly shortcut keys ...

Vim shortcut key:

The first is to move the cursor:

Simple: h/j/k/l right up and down left

Complex: num + h/j/k/l, moving num rows or columns in the specified direction

Word Jump:

Simple:

W: Transfer to next letter

E: Adjust to the next trailing letter (including the current word)

B: Adjust to the previous letter (including the current word)

W/e/b: Adjust to the next (w/e), Upper (B) the corresponding position of the word (the word is only separated by a space, such as: 57fdskl0-0-][] dsla9r93wer two words)

Complex:

num + w/e/bw/e/b, beating num Word positions in a specified direction

0: Move to the beginning of the line

^: first non-null character moved to the beginning of a line

$: Move to end of line

Delete:

Simple:

X: Delete the current character

X: Delete the previous character

Complex

num + x/x: Delete multiple characters

DD: Delete a row, equivalent to cut, the deleted content is temporarily in the buffer

D: Delete the current position to the end of the line

D +[num] w/e/b/w/e/b/0/$/^ (various move commands): Delete num locations to a specified location

Copy:

Simple

YY: Copy one line

Complex:

Y +[num] w/e/b/w/e/b/0/$/^: Copy specified location

Paste:

P: Paste after the current character

P: Paste in front of current character

Insert:

I: Insert before the current character

A: Inserted after the current character

A: Insert to end of line

New lines

O: New line on next line

O: New line on previous line

In-line search:

F + Single character (letters, numbers, symbols, etc.): looking backwards (inline)

F + single character (letters, numbers, symbols, etc.): Search forward (inline)

Full-Text Search:

/: Press "/" in command mode to enter the specified character (any number of characters) and look backwards

? : Looking forward

Note: Use N to find the next, N to the opposite drop find Next

About the settings for the search:

: Set IC: Search regardless of capitalization

: Set HLS is: Sets the search for the word Fugauliang, regardless of the case

: Set Noic: Setting search results, no highlighting

: Nohlsearch: Cancel highlighting of search results

Virtual mode:

V: Press V to enter virtual mode, you can move the cursor (jklhweb, etc.) to select some characters

V: Enter virtual mode and operate on a single line

Can save the file, press: w filename

You can copy the selected text, copy it with Y, and then paste

Can delete, press D, delete characters, save in cache

----------Well, a little late, and a lot more, Ah!!! ---------------------------

-----------to write-----------------------------------again next time.

Did not sleep, up and then wrote a virtual mode, feel a lot of did not write, have no idea how to write, OK, about the Vim shortcut key will not continue to write

If there is no patience, follow Vimtutor learn, only grasp some operations, it is impossible to get through the feeling good stage, that is, Vim is impossible to enter the actual use

Of course, simple editing some, or can, just not as the general editor faster ...

I will continue to summarize, may also be put on, may not

  

VIM the next day-shortcut keys

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.