Text editing tool vim

Source: Internet
Author: User

Vim: text editing tool
Vi is currently used, relatively powerful
Vim has three modes
Different modes have different functions.
Command mode-input mode input I key Conversion
Input mode-last line mode input: To last line

Use cursor movement in command mode
H, j, k, l

Delete operation
X cursor in one character at a time
D. delete a single dd in combination.
Ndd Delete row n
De deletes a word.
Dw deletes a word with spaces
10, 21 d Delete 10th rows to 21 rows
. Row where the current cursor is located
. 8 is to delete from the row where the cursor is located to 8th rows.
 
 
 

Copy and paste
Y Replication
Yy copy a row
Copy 3 rows in 3yy
P Paste
You can use u to cancel an error once in lower case.
Capital u undo all operations at a time
Ctrl + r undo
R single character replacement
. Repeat the previous operation
Visual mode: v V
Move text: d, p
 
This article is from the "Xu Shuai" blog

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.