Vim Program Editor Common operations

Source: Internet
Author: User

Press i to enter edit mode

wq! force Save and exit

Q! Do not save, force quit

! Have the meaning of compulsion

Directional keying:

K

H J L

Ctrl + F Move down one page

Ctrl + b Move up one page

0 at the beginning of a line

the last side of the $ line

the last line of the G file

the first line of the GG file

DD Delete the line where the cursor is located

YY copy cursor is the same as

P Paste copied content

U Rewind Ctrl + R forward both are a pair of actions

. decimal point ".", repeat an action

[ESC] exit edit mode, Shift +; Enter command line mode

Ctrl + V block selection, the selected area will be anti-white

Y Copy the anti-white content

D Remove the anti-white content

Multi-file editing

The SP can be appended with the file name, need to open to enter the file name, only the SP is the same file between two Windows

Ctrl + W + j/k for moving between Windows

Ctrl + W + q to exit the current window

Vim Setting value is not recommended in the /ETC/VIMRC file. Can modify ~/.VIMRC (default does not exist, manually created when needed)

Vim garbled problem, as long as the coding problem

Echo $LANG View encoding

Lang=zh_cn. UTF-8 Setting the encoding

Iconv instruction enables language-coded conversion


Vim Program Editor Common operations

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.