A tutorial on using Vim under Mac

Source: Internet
Author: User

Vim is divided into three modes, normal,insert,visual.

Switch between modes:

Esc:insert cut to normal

Shortcut key switching:

I: Insert character before cursor

I: Insert character at the beginning of the current line

O: Automatically insert a row on the current line

O: Automatically insert a row below the current line

A: Insert character after cursor

A: Insert character at the end of the current line

S: Delete character after current cursor

S: Delete a row

R: Replaces the character of the current cursor with the newly entered character and immediately returns to normal mode

R: Replaces all existing characters with newly entered characters at the beginning of the character at the current cursor position

Control+u: Command cursor moves up half screen

CTRL-E roll up one line, ctrl-y roll down one line.

Delete character:

X/DL: Delete the characters under the cursor

X/DH: Delete the character before the cursor

DD: Delete a row

DB: Delete the current position to the beginning of the previous word

DIW: Delete words on the cursor (excluding spaces)

Daw: Delete words on the cursor (including spaces)

A tutorial on using Vim under Mac

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.