Tải bản đầy đủ (.pdf) (18 trang)

Oreilly learning the vi Editor phần 1 ppsx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.5 MB, 18 trang )

By Linda Lamb; ISBN 0-937175-67-6, 173 pages.
Fifth Edition, August 1994.
(See the catalog page for this book.)
Search the text of Learning the vi Editor.
Index
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Table of Contents
Preface to the 5th Edition
Preface
Chapter 1: The vi Text Editor
Chapter 2: Simple Editing
Chapter 3: Moving Around in a Hurry
Chapter 4: Beyond the Basics
Chapter 5: Introducing the ex Editor
Chapter 6: Global Replacement
Chapter 7: Advanced Editing
Appendix A: Quick Reference
Appendix B: Setting Environment Options
Appendix C: ex commands
Appendix D: Problem Checklist
Copyright © 1998 O'Reilly & Associates. All Rights Reserved.
Learning the vi Editor
[2/6/2001 10:03:04 PM]
Full Text Search
Use this HTML form to search the contents of Learning the vi Editor.
Results report format:
Search for

If you are having difficulty searching, or if you have not used this search utility before, please read this.
Copyright © 1998 O'Reilly & Associates. All Rights Reserved.
Search Learning the vi Editor


[2/6/2001 10:03:06 PM]
Expanded
Reset search form
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: A
abbreviation command : 7.3.1. Word Abbreviation
avoiding loops : 7.3.1. Word Abbreviation
disabling : 7.3.1. Word Abbreviation
for multiple lines : 7.3.3. Protecting Keys from Interpretation by ex
listing current definitions : 7.3.1. Word Abbreviation
addresses of lines : 5.2.1. Line Addresses
append
after cursor (a) : 2.3.2. Appending Text
to end of line (A) : 2.4. More Ways to Insert Text
to existing files (:w >>) : 5.3.3. Appending to a Saved File
autowrap
2.1. vi Commands
2.2.3. Movement Within a Line
2.3.8.1. Repeat
7.1.4. Some Useful Options
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
[2/6/2001 10:03:09 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: B
braces, finding matching : 7.5.2. A Special Search Command
buffers
numbered : 4.3. Making Use of Buffers
preserve (:pre) : 4.2.3. Recovering a Buffer

recovering after a crash : 4.2.3. Recovering a Buffer
recovering numbered
2.3.5.4. Problems with Deletions
4.3.1. Recovering Deletions
renaming files : 5.3.1. Renaming the Buffer
saving commands in : 7.3.9. @-Functions
yanking to named
4.3. Making Use of Buffers
4.3.2. Yanking to Named Buffers
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
[2/6/2001 10:03:09 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: C
CAPS LOCK key : 2.5.1. Problem Checklist
change
character (r) : 2.3.3.3. Characters other
line (cc)
2.3.3.2. Lines
2.4. More Ways to Insert Text
text (c)
1. The vi Text Editor
2.3.3. Changing Text
2.6. Review of Basic vi Commands
4.1. More Command Combinations
text from cursor to end of line (C) : 2.3.3.2. Lines
word (cw)
2.3.3. Changing Text
2.3.3.1. Words

characters, deleting : (see vi commands)
command mode
1. The vi Text Editor
2.1. vi Commands
commands, vi : (see vi commands)
copy
range of lines (:co or :t) : 5.2.2. Defining a Range of Lines
text (y)
1. The vi Text Editor
2.3. Simple Edits
2.3.7. Copying Text
Index
(1 of 3) [2/6/2001 10:03:10 PM]
2.6. Review of Basic vi Commands
4.1. More Command Combinations
(see also yank)
(see also
(see also
(see also
(see also
(see also
(see also
(see also
text (yank and put) : 2.3.7. Copying Text
crash
recovering from : 4.2.3. Recovering a Buffer
crash, recovering from : 4.2.3. Recovering a Buffer
cursor movement
by character (h, j, k, l)
2.2.1. Single Movements

2.6. Review of Basic vi Commands
by line (+, -)
3.1.5. Movement by Line
3.1.5.1. Movement on the Current Line
by line number (G)
3.4. Movement by Line Number
3.4.1. The G (Go To) Command if
by repeating searches (n, N) : 3.3.1. Repeating Searches
by screen : 3.1. Movement by Screens
by search for a pattern (?, /) : 3.3. Movement by Searches
by text block : 3.2. Movement by Text Blocks
by word (w, b)
2.2.4. Movement by Text Blocks
2.6. Review of Basic vi Commands
search within current line (f, t) : 3.3.2. Current Line Searches
to marked place in file : 4.4. Marking Your Place
using numeric arguments : 2.2.2. Numeric Arguments
Index
(2 of 3) [2/6/2001 10:03:10 PM]
within a line (0, $)
2.2.3. Movement Within a Line
2.6. Review of Basic vi Commands
within a screen (H, M, L) : 3.1.4. Movement Within a Screen
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
(3 of 3) [2/6/2001 10:03:10 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: D
delete

all blank lines : 6.4.3. More Examples
character (x) : 2.3.5.3. Characters
line (dd) : 2.3.5.2. Lines
range of lines (:d) : 5.2.2. Defining a Range of Lines
text (d)
2.3.5. Deleting Text Chapter
2.3.7. Copying Text
2.6. Review of Basic vi Commands
4.1. More Command Combinations
to end of line (D) : 2.3.5.2. Lines
to end of sentence : 3.2. Movement by Text Blocks
up to pattern (d/pattern) : 3.3.2. Current Line Searches
word (dw) : 2.3.5.1. Words
deletions
recovering
from numbered buffers : 4.3.1. Recovering Deletions
deletions, recovering : 4.3. Making Use of Buffers
from numbered buffers
2.3.5.4. Problems with Deletions
4.3.1. Recovering Deletions
with undo : 2.3.5.4. Problems with Deletions
diff command (UNIX) : 7.4.5. ex Scripts Built by diff
display
current line number (^G)
3.4. Movement by Line Number
Index
(1 of 2) [2/6/2001 10:03:12 PM]
3.4.1. The G (Go To) Command if
line numbers (:set nu)
2.2.3. Movement Within a Line

3.4. Movement by Line Number
3.4.1. The G (Go To) Command if
line(s) (ex editor) : 5.1. ex Commands
dumb terminal
2.3.1. Inserting New Text
2.3.5.2. Lines
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
(2 of 2) [2/6/2001 10:03:12 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: E
editing and movement (combining) : 4.1. More Command Combinations
editing commands : (see vi commands and ex commands)
editor
line
1. The vi Text Editor
5.1. ex Commands
(see also ex editor)
(see also
screen
1. The vi Text Editor
(see also vi editor)
entering vi : (see opening a file or vi commands)
ESCAPE key : 2.1. vi Commands
/etc/termcap file : 7.1. Customizing vi
ex commands
abbreviate words (:ab) : 7.3.1. Word Abbreviation
allow metacharacters (:set magic) : 7.1.4. Some Useful Options
allow other .exrc files (:set exrc) : 7.1.3. Alternate Environments

append to existing files (:w >>) : 5.3.3. Appending to a Saved File
call in next of multiple files (:n) : 5.5.2. Calling In New Files
combining with vertical bar
5.2.7. Combining ex Commands
7.3.3. Protecting Keys from Interpretation by ex
confirm substitutions : 6.1. Confirming Substitutions
context-sensitive replacement
6. Global Replacement
Index
(1 of 4) [2/6/2001 10:03:13 PM]
6.2. Context-sensitive Replacement
copy lines (:co) : 5.2. Editing with ex
define paragraphs (:set para=) : 3.2. Movement by Text Blocks
define sections (:set sect=) : 3.2. Movement by Text Blocks
define shiftwidth (:set sw=) : 7.5.1. Indentation Control
define tabs (:set ts=) : 7.5.1. Indentation Control
define window size (:set w=) : 7.1.1. The :set Command
delete lines (:d) : 5.2. Editing with ex
display line (:p) : 5.1. ex Commands
display line numbers (:set nu)
2.2.3. Movement Within a Line
3.4. Movement by Line Number
3.4.1. The G (Go To) Command if
display tabs (:set list) : 7.5.1. Indentation Control
edit : 5.5. Editing Multiple Files
edit multiple files (:e) : 5.5.2. Calling In New Files
execute UNIX commands from vi : 7.2. Executing UNIX Commands
filter text through UNIX command : 7.2.1. Filtering Text Through a Command
for loop with : 7.4.1. Looping in a Shell Script
global (:g) : 6. Global Replacement

global search (:g) : 5.2.6. Global Searches
here documents : 7.4.2. Here Documents
ignore case (:set ic) : 6.3.2. Metacharacters Used in Replacement Strings
indent input (:set ai) : 7.5.1. Indentation Control
invoke on a file : 5.1. ex Commands
invoke vi (:vi) : 5.1. ex Commands
line addressing symbols : 5.2.3. Line Addressing Symbols
map command sequence : 7.3.2. Using the map Command
map function keys : 7.3.7. Mapping Function Keys
match brackets (:set sm) : 7.5.2. A Special Search Command
move lines (:m) : 5.2. Editing with ex
move text blocks by patterns : 6.4.2. Block Move by Patterns
number lines (:set nu) : 5.2.2. Defining a Range of Lines
Index
(2 of 4) [2/6/2001 10:03:13 PM]
pattern matching : 6.3. Pattern-matching Rules
preserve a buffer (:pre) : 4.2.3. Recovering a Buffer
quick reference to
A. Quick Reference
C. ex commands
quit file (:q) : 5.3. Saving and Exiting Files
quit without saving edits (:q!)
1.1.2. Problems Opening Files
1.2. Quitting Without Saving Edits
5.3. Saving and Exiting Files
read in a file (:r) : 5.4. Copying a File into Another File
replace in text block : 6.4.2. Block Move by Patterns
save : 7.3. Saving Commands
save and exit files : 5.3. Saving and Exiting Files
save in buffer : 7.3.9. @-Functions

save part of a file : 5.3.2. Saving Part of a File
save under new filename : 5.3.1. Renaming the Buffer
scripts : 7.4. Using ex Scripts
built by diff : 7.4.5. ex Scripts Built by diff
search for class of words : 6.4.1. Search for General Class of Words
search patterns : 5.2.4. Search Patterns
set ignorecase (:set ic)
7.1.1. The :set Command
7.1.4. Some Useful Options
set vi options
7.1. Customizing vi
7.1.1. The :set Command
set wrapmargin (:set wm=)
2.1. vi Commands
2.2.3. Movement Within a Line
2.3.8.1. Repeat
set wrapscan (:set ws) : 3.3.1. Repeating Searches
sort text blocks : 7.4.3. Sorting Text Blocks: A Sample ex Script
substitute (:s)
Index
(3 of 4) [2/6/2001 10:03:13 PM]
5.1. ex Commands
6. Global Replacement
syntax of : 1. The vi Text Editor
use from within vi : 5.1. ex Commands
wrap searches (:set ws) : 7.1.4. Some Useful Options
wrap words (:set wm=) : 7.1.4. Some Useful Options
write (save) and quit file (:wq) : 5.3. Saving and Exiting Files
write (save) and quit file (:x) : 5.3. Saving and Exiting Files
write (save) file (:w) : 5.3. Saving and Exiting Files

yank text between files : 5.5.3. Edits Between Files
ex editor
1. The vi Text Editor
5. Introducing the ex Editor
(see also ex commands)
(see also
EXINIT variable (vi environment) : 7.1. Customizing vi
.exrc file (vi environment)
7.1. Customizing vi
7.1.2. The .exrc File
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
(4 of 4) [2/6/2001 10:03:13 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: F
files
append to existing : 5.3.3. Appending to a Saved File
call in next of multiple : 5.5.2. Calling In New Files
editing between : 5.5.3. Edits Between Files
editing multiple
5.5. Editing Multiple Files
5.5.2. Calling In New Files
invoking vi on multiple : 5.5.1. Invoking vi on Multiple Files one
marking a place in : 4.4. Marking Your Place
opening
(see opening a file)
(see vi commands)
(see
quit : 5.3. Saving and Exiting Files

quit and save edits
1.1.3. Saving and Quitting a File
1.2. Quitting Without Saving Edits
1.2.1. Problems Saving Files
2.6. Review of Basic vi Commands
5.3. Saving and Exiting Files
quit without saving edits
1.1.2. Problems Opening Files
1.2. Quitting Without Saving Edits
2.6. Review of Basic vi Commands
5.3. Saving and Exiting Files
reading in : 5.4. Copying a File into Another File
Index
(1 of 2) [2/6/2001 10:03:14 PM]
save as new : 5.3.1. Renaming the Buffer
saving
1.1.3. Saving and Quitting a File
5.3. Saving and Exiting Files
(see also vi commands)
(see also
saving part of : 5.3.2. Saving Part of a File
filter text through a UNIX command : 7.2.1. Filtering Text Through a Command
for loop : 7.4.1. Looping in a Shell Script
function keys, mapping : 7.3.7. Mapping Function Keys
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
(2 of 2) [2/6/2001 10:03:14 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: G

general form of vi commands : 2.3.3.1. Words
global replacement : 6. Global Replacement
collecting lines : 6.4.4.4. Collecting Lines
confirming : 6.1. Confirming Substitutions
context-sensitive
6. Global Replacement
6.2. Context-sensitive Replacement
delete blank lines : 6.4.3. More Examples
delete variable text string : 6.4.4.1. Deleting an Unknown Block of Text
different character as pattern delimiter : 6.4.3. More Examples
inserting lines : 7.3.3. Protecting Keys from Interpretation by ex
lines that don't match : 6.4.3. More Examples
on text blocks : 6.4.2. Block Move by Patterns
one or more characters : 6.4.3. More Examples
pattern matching : 6.3. Pattern-matching Rules
repeat an ex command : 6.4.4.3. Using :g to Repeat a Command
reverse line order : 6.4.3. More Examples
reverse word order
6.4.3. More Examples
6.4.4.2. Switching Items in a Database
search for class of words : 6.4.1. Search for General Class of Words
simple
6. Global Replacement
6.2. Context-sensitive Replacement
undoing : 6.1. Confirming Substitutions
uppercase conversion : 6.4.3. More Examples
Index
(1 of 2) [2/6/2001 10:03:15 PM]
whole word
6.4. Pattern-matching Examples

6.4.3. More Examples
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
(2 of 2) [2/6/2001 10:03:15 PM]
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: H
here documents : 7.4.2. Here Documents
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
[2/6/2001 10:03:16 PM]

×