Vim Use Notes

Source: Internet
Author: User
Tags exit in

Move

HJKL ctrl+udbf

f+ character: Moves backward to the specified character

f+ character: Moves forward to the specified character

Example:

FG moves to letter G

0dfH: Delete From the beginning of the line to the first H

Move in Word

W Move head backwards

E moves backwards to the tail

B Move Head forward

Ctrl+o move to last position

Revert last action (undo) U

Redo the last action Ctrl+r

Repeat the last action. decimal point

merges the row of the cursor with the next row of data into a row J

find shift+8 mobile N,n

Match Line execution vim command , help option: help:g

For example,: G/./normal 0DF: Deletes characters from the beginning of a line to a colon for a non-blank row

Enter the TAB key in insert mode, Ctrl+v,tab

Format layout in Visual mode

CTRL + V Select columns

Shift+v Select rows

Format: =

Insert "#" at the beginning of the selected line: Ctrl + V, move selection, 0,shift+i,shift+3

Block indent: shift+v, select range, type >

Fast indent :,>> << in normal mode

Fast indent Multiple lines: number of rows +>>

in Vim, execute the external command input:!, and then enter the external commands that can be executed

vim and Shell switch : shell, switch to shell, enter exit in Shell, go back to Vim

vim View binary files :%!xxd

exact Match "\>" means that only the end of the word is matched, "\<" indicates the matching word header

Selective save : #,#–w filename "#" indicates line number

Multi-Window viewing

Vim–o[o] File1 file2

CTRL+WW switching between windows

Delete from current line to last row:., $d

Vim Use Notes

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.