PHP Essay---LAMP VI editor

Source: Internet
Author: User

Use of the ◇vi editor:

◇vi Editor: Three modes ( command, edit, tail line )

◇ left bottom shows empty is command mode

(*) How to use the command mode:

    ◇ cursor Movement: 1, character level: up and down (k), left (k), right-click Move

2, the word level: W moves to the first letter of the next word, E moves to the next word's tail letter (including this word), B moves to the first letter of the last word (including this word)

3, Row level: 0 move to the beginning of the bank, $ moved to the end of the bank,

4. Paragraph level: {: Last (this) paragraph header}: next (this) paragraph trailing

5, document level: G: Document Weibo 1G: First line of the document NG: line N of the document

◇ Content deletion: DD: Delete cursor when moving forward

2DD: Delete Two lines of content, including the current line

NDD: Including the current, delete the contents of the N rows behind

X: Delete the character of the cursor

C+w: Delete from the cursor location to the end of the word and enter edit mode

◇ Content Replication: yy: Copies the current line of the cursor.

2yy: Include the current line in Eh, copy 2 rows back

Nyy: Including the current line, copy the contents of n rows behind

P: Paste Copy Good content

◇ related quick action: U:undo revocation

J: Merge up and down two lines

R: When a character is replaced

. (point): Repeat the last used instruction

◇ Edit mode Toggle: "A,e,i,o" to switch

◇a: Cursor moves backward one bit, into edit mode

    ◇i: Cursor and character are not changed, enter edit mode

◇o: New line into edit mode, enter edit mode

◇s: Delete the character of the cursor and enter edit mode

Tail line mode use ":" or "/" to switch, using the method:

◇:q//quit Exit Editor

◇:w//write (write) Save

◇:WQ//write and exit

◇q! Force exit editor, do not save

◇set nu//Set line number set Nonu//Cancel line number

◇wq! Force Save and exit editor

◇ "/" + direct input content, find specified content such as find "Hello" with/hello N (Find Next) n (Find previous)

◇ string substitution s/string1/string2 For example to replace Hello with good S/hello/good

◇s/string1/string2/g replaces the current line with an entire row of string1 for string2

◇%s/string1/string2/g replaces the entire document with a string1 of string2

PHP Essay---LAMP VI editor

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.