Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Basic vi Editor.

Similar presentations


Presentation on theme: "Chapter 2 Basic vi Editor."— Presentation transcript:

1 Chapter 2 Basic vi Editor

2 Figure 2-1 The vi Editor

3 Figure 2-2 vi Modes

4 Figure 2-3 A Small File in vi

5 Insert Text Before the Cursor and Line
Figure 2-4 Insert Text Before the Cursor and Line

6 Insert Text After the Cursor and Line
Figure 2-5 Insert Text After the Cursor and Line

7 Figure 2-6 Insert New Line

8 Figure 2-7 (a and b) Horizontal Moves

9 Figure 2-7 (c and d) Horizontal Moves

10 Figure 2-8 (a and b) Vertical Moves

11 Figure 2-8 (c and d) Vertical Moves

12 Figure 2-9 Delete Commands

13 Figure 2-10 The join Command

14 Scrolling ctrl+y : Scroll up one line. ctrl+e : Scroll down one line.
Figure 2-11 Scrolling ctrl+y : Scroll up one line. ctrl+e : Scroll down one line. ctrl+u : Scroll up half a screen. ctrl+d :Scroll down half a screen. ctrl+b : Scroll up whole screen. ctrl+f : Scroll down whole screen.

15 Figure 2-12 Undo Commands

16 Saving and Exit Commands
Save work and Continue (:w) Save the contents of the buffer without quitting vi. Save to New File (:w filename) Save and Quit (ZZ) Write and Quit (:wq) Quit (:q) Quit and Don’t Save (:q!)

17 명령어 모드에서 ‘i’를 입력하면 삽입 모드로 바뀌고 원하는 문자를 입력한다.
Session I : Creating a File(파일 만들기) Session 2.1. Starting vi $ vi jfkQuote ~ Session Inserting Text Ask not what your country can do for you; Ask what you can do for your country. John Fitzgerald Kennedy Inaugural Address January 1961 ... "jfkQuote" [New file] 6 lines, 143 characters 파일을 만들기 위해 단말기 창의 $ 상에서 vi와 파일 이름을 입력한다. enter i 명령어 모드에서 ‘i’를 입력하면 삽입 모드로 바뀌고 원하는 문자를 입력한다. ESC :w

18 Session II : Modifying a File(파일 수정하기)
$ vi jfkQuote Session Revising Text Ask not what your college can do for you. Ask what you can do for your college. Ima Student De Anza College January 14, 2001 ~ ... country  college 7xicollegeESCklll 3ddo…

19 2.10 Practice Set Review Quuestions Exercise
21. Which of the following keystrokes can delete the current character? 22. Which of the following keystrokes can delete the current line? 23. Which of the following keystrokes moves you from the command mode to the text(insert) mode?

20 24. Which of the following keystrokes moves you from the command mode to the text mode?
26. Which of the following keystrokes moves you from the text mode to the command mode? 27, 28, 29, 30, 31, 32, 33, 37, 38, 39


Download ppt "Chapter 2 Basic vi Editor."

Similar presentations


Ads by Google