Vim Learning Record (i) Getting Started

Source: Internet
Author: User

Vim is known as the ancient artifact. A small editor, the appearance is not very humble, the name of the artifact from? This is what attracts me. --In this memo.

Vim is a free software that also admires the author's philanthropic behavior and helps Ugandan children if you benefit from vim and ability.

Vim's help documentation is very detailed, but unfortunately all English is not easy to learn. There is a Vimtotur (totur:private teacher) executable file under the Windows version that is ideal for getting started and has detailed basic operations. This article, according to the software's help document, records the useful operation, and the difficulty.

First, Getting Started

01. Initial use of Vim

: Gvim file.txt Create a new file named File.txt, and a new window opens. Default to the \[user]\file.txt directory (Mac System)

: Vim file.txt creates a new file named File.txt that opens in the current window. Default to the \[user]\file.txt directory (Mac System)

02. Insert text (normal mode)--After entering the command, the software will automatically go to (insert mode) press the EXC key to exit

I insert before the cursor

A after the cursor is inserted

o Insert on the next line of the cursor (for the next line of input)

O Insert a new line above the cursor, and the original line moves down.

03. Move cursor (normal mode)

J Cursor moves down one line

K The cursor moves up one line

H cursor moves forward one character

L cursor moves backward one character

04. Delete (Normal mode)

DD Delete entire row

x Delete the characters under the cursor

J connect a line with the following line of characters

05. Undo and Redo

U undo

C-r Redo, Control+r

06. Exit

ZZ Save and exit

: q! Exit Do not save changes

07: Jump to the help document

C+] Access link

C+t back from Link

Other, move and delete commands before adding a number indicates that the command executes several times. Like 5j, move down 5 lines.

Vim Learning Record (i) Getting Started

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.