Top Banner
Chapter 5 Editing Text Files
39

Chapter 5

Jan 03, 2016

Download

Documents

Kenyon Turner

Chapter 5. Editing Text Files. Basic Concept. A text editor works on a file buffer that is a memory copy of a disk file The disk file is not updated until we save the memory buffer Common UNIX text editors ed pico vi emacs, ue, XEmacs, emacs21. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 5

Chapter 5

Editing Text Files

Page 2: Chapter 5

Basic Concept

• A text editor works on a file buffer that is a memory copy of a disk file

• The disk file is not updated until we save the memory buffer

• Common UNIX text editors– ed– pico– vi– emacs, ue, XEmacs, emacs21

Page 3: Chapter 5

Table 5.1 Common Functions of LINUX Text Editors

• A text editor works on a file buffer that is a memory copy of a disk file• Usually the disk file is not updated until we save the memory buffer

Page 4: Chapter 5

Figure 5.1  First pico screen display

Page 5: Chapter 5

Figure 5.2  Saving a file with a name in pico

Page 6: Chapter 5

Table 5.2 Keystroke Commands and Their Actions in pico

Page 7: Chapter 5

Table 5.3 Important Cursor Movement Keystroke Commands in pico

Page 8: Chapter 5

Figure 5.3  Cut and pasted linespaced text in pico

Page 9: Chapter 5

Figure 5.4  LINUX vi screen with example script file

Page 10: Chapter 5

Figure 5.5  Operating modes of the vi text editor

Page 11: Chapter 5

Figure 5.6 The vi start-up screen

Page 12: Chapter 5

Table 5.4 Examples of vi Command Syntax

Page 13: Chapter 5

Table 5.5 Important Keys for the Insert Mode

Page 14: Chapter 5

Table 5.6 Important Commands for the Command Mode

Page 15: Chapter 5

Figure 5.7  Saved file firstvi

Page 16: Chapter 5

Figure 5.8  Final form of file firstvi

Page 17: Chapter 5

Table 5.7 Cursor movement and Keyboard Editing Commands

Page 18: Chapter 5

Table 5.8 Examples of the Syntax for the yank and put Commands

Page 19: Chapter 5

Table 5.9 Examples of the Syntax for the substitute Command

Page 20: Chapter 5

Table 5.10 Important Environment Options for vi

Page 21: Chapter 5

Figure 5.9  First emacs screen display

Page 22: Chapter 5

Table 5.11 Important emacs Commands

Page 23: Chapter 5

Table 5.12 Important emacs Cursor Movement and Editing Commands

Page 24: Chapter 5

Figure 5.10 The emacs display of the file alien

Page 25: Chapter 5

Figure 5.11  The file alien2 after the buffer contents have been saved

Page 26: Chapter 5

Table 5.13 Important Keyboard Macro Commands

Page 27: Chapter 5

Figure 5.12  The file datafile with 10 rows of data

Page 28: Chapter 5

Table 5.14 Important emacs Kill and Yank Commands

Page 29: Chapter 5

Table 5.15 Interactive Search and Replace Actions

Page 30: Chapter 5

Figure 5.13  The layout of the first XEmacs screen display

Page 31: Chapter 5

Figure 5.14  Initial display of datafile in XEmacs

Page 32: Chapter 5

Table 5.16 XEmacs Pull-Down Menu Choices Described

Page 33: Chapter 5

Table 5.17 XEmacs Toolbar Button Descriptions

Page 34: Chapter 5

Figure 5.15  File alien after being edited in XEmacs

Page 35: Chapter 5

Table 5.18 Important Readline Variables

Page 36: Chapter 5

Table 5.19 Commonly Used Bindable Readline Commands

Page 37: Chapter 5

Table 5.19 Commonly Used Bindable Readline Commands

Page 38: Chapter 5

Table 5.19 Commonly Used Bindable Readline Commands

Page 39: Chapter 5

Table 5.19 Commonly Used Bindable Readline Commands