Python Learning record--ubuntu (v) Vim

Source: Internet
Author: User
Tags first string

I. Working mode switching

Two. Vim Command small copy

Three. Operation Commands

1. command to enter VI:

(1) VI filename: Opens or creates a new file and places the cursor at the beginning of the first line

(2) VI +n FileName: Opens the file and places the cursor at the beginning of nth

(3) VI + FileName: Open the file and place the cursor at the beginning of the last line

(4) VI +/pattern FileName: Open the file and place the cursor at the first string matching the pattern

(5) Vi-r filename: A system crash occurred during the last edit with VI, restoring filename

(6) VI filename....filename: Open multiple files, edit them sequentially

2. Move the Cursor Class command:

(1) H: Move the cursor one character to the left

(2) L: Move the cursor right one character

(3) Space: Move the cursor right one character

(4) Backspace: Move the cursor left one character

(5) K or ctrl+p: Move the cursor up one line

(6) J or CTRL + N: Move the cursor down one line

(7) Enter: Move the cursor down one line

(8) W or w: Move the cursor right one word to the beginning of the word

(9) B or B: The cursor moves left one word to the beginning of the word

E or E: Move the cursor right one word to the end of the word

(11)): Move the cursor to the end of the sentence

(12) (: Cursor moves to the beginning of the sentence

(13)}: Move the cursor to the beginning of the paragraph

(14) {: Cursor moves to end of paragraph

NG: The cursor moves to the beginning of nth

(+) n+: Move the cursor down n rows

N: The cursor moves up n rows

N: The cursor moves to the end of the nth line

H: Move the cursor to the top line of the screen

M: Move the cursor to the middle line of the screen

L: The cursor moves to the last line of the screen

(22) 0: (note is the number 0) the cursor moves to the beginning of the current line

3. Screen Tumbling Class command:

(1) Ctrl+u: Half screen to the top of the file

(2) Ctrl+d: Half-screen to the end of the file

(3) Ctrl+f: Flip a screen to the end of the file

(4) Ctrl+b; Turn one screen to the top of the file

(5) NZ: Rolls line N to the top of the screen and scrolls the current line to the top of the screen when n is not specified.

4. Insert the Text Class command:

(1) I: Before the cursor

(2) I: At the beginning of the current

(3) A: After the cursor

(4) A: At the end of the current line

(5) O: A new line under the current line

(6) O: New row above the current line

(7) R: Replace the current character

(8) R: Replaces the current character and its characters until the ESC key is pressed

(9) S: replaces the specified number of characters with the text entered, starting at the current cursor position

(Ten) S: Deletes the specified number of lines and replaces them with the text entered

(one) NCW or NCW: Modify the specified number of words

NCC: Modifying a specified number of rows

Python learning record--ubuntu (v) Vim

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.