1. Trang chủ
  2. » Thể loại khác

Tài Liệu - Võ Tấn Dũng (votandung) Unit5 Linux ITC

17 123 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 17
Dung lượng 1,73 MB

Nội dung

Tài Liệu - Võ Tấn Dũng (votandung) Unit5 Linux ITC tài liệu, giáo án, bài giảng , luận văn, luận án, đồ án, bài tập lớn...

Information Technology College of HoChiMinh city Faculty of Information Technology Course: Fundamentals of Linux OS Unit Using vi editor Lecturer: Võ Tấn Dũng votandung@yahoo.com http://sites.google.com/site/votandungsg/ Introduction to vi • The visual display (vi) editor is an interactive editor that is used to create and/or modify text files • The vi editor uses a screen display, but you cannot use the mouse to position the cursor • All editing with the vi editor is done within a buffer Changes can be written to the disk or discarded • It is important for users who are learning to become system administrators to know how to use vi It is the only full screen editor that can be used to edit crucial system files This skill is also needed in case the windowing system is not available VÕ TẤN DŨNG vi Modes There are three modes of operation in vi: • Command mode • Entry mode • Last-line mode When you open a file with vi, you are in command mode In this mode, you can enter positioning and editing commands to perform functions While in command mode you can advanced editing commands by typing a colon (:), which places you at the bottom line of the screen This is called last-line mode However, all commands are initiated from command mode VÕ TẤN DŨNG vi Modes (cont.) • You must be in entry mode to enter text To enter text, you must type a vi insert command such as i, o, or a This takes vi out of command mode and puts it into entry mode In this mode, text will not be interpreted as editing commands When you finish entering text in your file, press the Escape key to return to command mode VÕ TẤN DŨNG Invoking vi Command Format vi [option(s)] [filename] view [filename] Example • To create a new file, invoke vi with a new file name by typing $ vi filename VÕ TẤN DŨNG Input Commands • To append or insert text, use the following options: VÕ TẤN DŨNG Positioning Commands • The following pages list the vi editor’s editing and positioning commands, which are used to make changes • The vi editor is case sensitive, so use the specified case when using the editing and positioning commands VÕ TẤN DŨNG Positioning Commands (cont.) This table shows the key sequences for character movement: VÕ TẤN DŨNG Editing Commands: Deleting Text VÕ TẤN DŨNG Editing Commands: Undoing, Repeating, and Changing Text Commands VÕ TẤN DŨNG Editing Commands: Copying and Pasting Text VÕ TẤN DŨNG Editing Commands: Saving and Quitting Files VÕ TẤN DŨNG Advanced Editing Options The vi editor includes options for customizing your edit sessions, such as: • Displaying line numbers • Displaying invisible characters such as tab and end-of-line characters The set command is used from last-line mode to control these options VÕ TẤN DŨNG Advanced Editing Options (cont.) To find a line or to search and replace and advanced editing, use the following options: VÕ TẤN DŨNG Advanced Editing Options (cont.) VÕ TẤN DŨNG Creating and Saving a File VÕ TẤN DŨNG END OF UNIT • remember to your homework (see http://sites.google.com/site/votandungsg/) VÕ TẤN DŨNG ... options: VÕ TẤN DŨNG Advanced Editing Options (cont.) VÕ TẤN DŨNG Creating and Saving a File VÕ TẤN DŨNG END OF UNIT • remember to your homework (see http://sites.google.com/site/votandungsg/) VÕ TẤN... Repeating, and Changing Text Commands VÕ TẤN DŨNG Editing Commands: Copying and Pasting Text VÕ TẤN DŨNG Editing Commands: Saving and Quitting Files VÕ TẤN DŨNG Advanced Editing Options The vi... positioning commands VÕ TẤN DŨNG Positioning Commands (cont.) This table shows the key sequences for character movement: VÕ TẤN DŨNG Editing Commands: Deleting Text VÕ TẤN DŨNG Editing Commands:

Ngày đăng: 15/12/2017, 16:48

TỪ KHÓA LIÊN QUAN