Linux Vim Editor

Source: Internet
Author: User
Tags file copy

The VI editor is a modal editor and features exceptionally powerful volume and short

And the vim we're using now is the enhanced version of VI.

VIM use Format

vim [options] [/path/to/somefile]

Here's The path can also be omitted to write after writing the contents of the path such as Windows to open the first

A notepad and then save its path.

three modes of vim


Default mode Command mode edit mode to delete the file copy and paste operations

Input mode Modify the text file input is also called insert mode

Last-row mode can perform commands such as Save find replace exit


Vim Conversion between modes


Edit mode--Input mode

the I-insert implementation converts the character match either at the current cursor to input mode

A append implementation converts to input mode after the current cursor is in the same character

o Implement the current cursor create a new blank space below the line to convert to input mode

I implement the current cursor line beginning to convert to input mode

A to convert the line end of the current cursor to input mode

O implement a new blank line above the current cursor to convert to input mode

Input mode--edit mode

Click the ESC key

Edit Mode--last-line mode

Enter a colon:

Last-line mode-> Edit mode

Press the ESC key two

Input mode--> Last-line mode

This can only be achieved by first converting to edit mode and then converting the last row mode


VIM cursor Jump

H: Jump to one character to the left

L: One character ↑k to the right bar

J: Jump down one character h←→l

K: Jump up one character ↓j

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.