Vim Interface Operation Brief

Source: Internet
Author: User

Full Screen text editor

VI:

Vim:vi Improve

Modal editor

Edit mode (Command mode)

Last-line mode

Insert mode

Replacement mode

Visualization mode

1 VI

2 Vim file

3 Vim + Number file If the number of rows positioned is greater than the maximum number of rows in the file, locate the last line

4 Vim + file

5 Vim +/patton/


Vim the Closing method

: Q Close directly, do not save content
: q! Force quit but not save modified content

: w Save the modified content

: w! Force Save

: Wq to exit after saving

: wq! Force Save and exit

Close in edit mode:

ZZ: Save and exit

ZQ: Do not save and exit

    • In Vim's edit mode, move the cursor

1 Character-by- word movement

ARROW

H: Left

L: Right

J: Down

K: Up
2 Verbatim movement

W: Move to the beginning of the next word

e: move to the end of the next word

B: move to the first word of the previous word

3 in-line jump

0 : Absolute Beginning

^: Absolute end of line

$: Relative beginning of line
4 inline Jump

Digital +g: Move the cursor directly to the number line

G: move the cursor directly to the last line of the document

GG: move the cursor directly to the first line of the document


Flip Screen:
Ctrl+f: Down
Ctrl+b: Up

ctrl+d: Half-screen down

Ctrl+u: Up half screen

    • Character-by-word deletion

x : Deletes a single character after the cursor position

X: Delete a single character to the left of the cursor position

    • Universal Delete Mode in edit mode

D : Delete all content that the cursor passes through

DL DJ DK

DD : Delete the line where the cursor is located ...

    • In the last line mode:

D: Delete cursor in the row

#d: Delete Line #

    • Universal in edit mode Paste Command
      P (lowercase): Paste right Down

P ( uppercase): Paste left up

    • Last-line mode: p (not much used)

    • Universal Copy command in edit mode
      Y: Copy everything that the cursor has entered

yy : Delete the line where the cursor is located

    • Mode switching
      1 from edit to last line mode:
      : Enter command
      and To find

/: Top-down

? : Bottom-up

2 from last line to edit:

Esc

Enter

Backspace


3 from Input mode to edit mode

Esc

4 from edit to replace

R

5 from replace to edit

Esc

6 from edit to visualization

V: Rectangle selection by character

V: Rectangle selection by behavior Unit


    • Replace command

R : Replaces one character at the cursor position

    • Undo Edit Operation

u: Undo Previous Action

Crtl+r: Undo The most recent undo Operation

    • Repeat the previous edit operation

.

    • Special last-line commands

1 displaying and canceling line numbering 1

Set Number (set Nu)

Set Nonumber (set Nonu)

2 turn on or off character case differences

Set Ignore (Set IC)

Set Noignore (set Noic)

3 Turn auto indent on or off

Set AI

Set Noai

4 turn on or off find highlighting

Set Hlsearch

Nohl

5 turn syntax coloring on or off

Syntax on

Syntax off

This article is from the "Clean yourself into" blog, please be sure to keep this source http://liangqunzhi.blog.51cto.com/10674929/1907745

Vim Interface Operation Brief

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.