VI simple operating instructions

xiaoxiao2021-03-06  43

Sender: Albin (Aile Bin), News District: Linux

Title: VI simple operating instructions (Linux elective course reference materials)

Sending station: Bihai Youth (THU Apr 22 22:10:19 1999), station letters

┌ --------- ┐

│ VI Easy Operating Instructions │

└ --------- ┘

, What is VI

VI is a screen editor provided by a UNIX itself, which provides a window device,

Through it, you can edit the file.

, Environmental description

This article □ Example The operation of the base is Sun1cc, the PC10 connection operation from the open system room.

See

Note: There is "------" under the text, indicating that the user needs to enter the instruction yourself.

I. Introduction to VI Concept

Vi can be divided into three states:

1.Command mode: Control the movement of the screen cursor, the deletion of the character or cursor, move the copy to a zone

Segment and enter INSERT MODE or go to Last Line Mode.

2.Isert mode: Only in Insert Mode, you can do text data input, press

The key can be to Command Mode.

3.Last Line Mode: Write the file or leave the editor, you can also set an editing environment, such as looking for

String, list line number .. Wait.

Second, the basic operation of VI

Enter vi

Enter the VI and the file name under the system prompt symbol, enter the VI full screen editing screen,

And under Command Mode.

And under Command Mode.

Sun1cc% VI Testfile

-----------

2. Switch to Insert Mode Edit File:

Under Command Mode, press 'I' or 'A' or 'O' Three-2 to enter INSERT MODE.

3. Leave VI and archive:

Press ':' to enter Last Line Mode under Command Mode.

: W FileName (deposit of specified file)

------------

: WQ (writing and leaving VI)

-

: Q! (Leave and give up editing file)

-

Third, the function key under Command Mode

1. Enter Insert Mode

I: Insert, insert the text you enter from the current cursor.

A: Increase, the next word of the current cursor begins to enter text.

o: Enter text from the first line of rows.

2. Mobile cursor

2. Mobile cursor

H, J, K, L: Control the left, bottom, upper and right, respectively.

^ B: From a page.

^ f: Top ahead.

G: Move to the file.

0: Move to the beginning of the file.

3. Delete

x: Delete a character.

#x: Example, 3x table deletes 3 words.

DD: Delete the trip to the cursor.

#dd: Example, 3DD Table Removes 3 rows of the self-tourism.

4. Change

CW: Change the words of the governor to the word tail.

C # w: Case, C3W table changes 3 words.

5. Replace

R: Replace the word element of the cursor.

R: Replace the fl cell until is pressed.

6. Copy

YW: Copy the word to the target to the word.

P: Replication (PUT) to the desired.

(Instruction 'YW' and 'P' must be used with it.)

7. Jump to the specified trip

^ g: List the line number

^ g: List the line number

#G: Example, 44G Table Move Jacon to Chapter 44.

Fourth, Last Line Mode under instructions

Note: Please press the button before use. Under Command Mode.

Press ':' or '/' or '?' Three key to enter the Last Line Mode.

1. Listing line number: SET NU (available: set all lists all selection.)

--------

2. Look for strings / Word (looking for the first to the tail)? Word (from the end to the first look) ---- ----

, Refer to resources

I: Wu Wenjie second grade B class (wwc@sun1cc.nccu.edu.tw)

Or 迳 迳 电算 中心 开 开 系统 室 (R.414) * Welcome * Inquiry * Guide *

Bibliographic: Made in Sunos (Li Weimin, Songgang)

SunOS Quick Manual (Bi Sheng, Lin Guorui, Third Wave)

-

☆ [Origin: ◎ Coconut forest style ◎] [from: woju.g1.ntu.edu.tw] [login: **] [post: **]

转载请注明原文地址:https://www.9cbs.com/read-77740.html

New Post(0)