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
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
Figure 5.1 First pico screen display
Figure 5.2 Saving a file with a name in pico
Table 5.2 Keystroke Commands and Their Actions in pico
Table 5.3 Important Cursor Movement Keystroke Commands in pico
Figure 5.3 Cut and pasted linespaced text in pico
Figure 5.4 LINUX vi screen with example script file
Figure 5.5 Operating modes of the vi text editor
Figure 5.6 The vi start-up screen
Table 5.4 Examples of vi Command Syntax
Table 5.5 Important Keys for the Insert Mode
Table 5.6 Important Commands for the Command Mode
Figure 5.7 Saved file firstvi
Figure 5.8 Final form of file firstvi
Table 5.7 Cursor movement and Keyboard Editing Commands
Table 5.8 Examples of the Syntax for the yank and put Commands
Table 5.9 Examples of the Syntax for the substitute Command
Table 5.10 Important Environment Options for vi
Figure 5.9 First emacs screen display
Table 5.11 Important emacs Commands
Table 5.12 Important emacs Cursor Movement and Editing Commands
Figure 5.10 The emacs display of the file alien
Figure 5.11 The file alien2 after the buffer contents have been saved
Table 5.13 Important Keyboard Macro Commands
Figure 5.12 The file datafile with 10 rows of data
Table 5.14 Important emacs Kill and Yank Commands
Table 5.15 Interactive Search and Replace Actions
Figure 5.13 The layout of the first XEmacs screen display
Figure 5.14 Initial display of datafile in XEmacs
Table 5.16 XEmacs Pull-Down Menu Choices Described
Table 5.17 XEmacs Toolbar Button Descriptions
Figure 5.15 File alien after being edited in XEmacs
Table 5.18 Important Readline Variables
Table 5.19 Commonly Used Bindable Readline Commands