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

Oreilly learning the vi Editor phần 2 docx

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, 21 trang )

A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index: I
indenting automatically in insert mode : 7.5.1. Indentation Control
insert
at beginning of line (I) : 2.4. More Ways to Insert Text
at cursor (i)
2.1. vi Commands
2.3.1. Inserting New Text
on new line (O, o) : 2.4. More Ways to Insert Text
text (i) : 1. The vi Text Editor
insert mode : 2.1. vi Commands
mapping : 7.3.6. Mapping Keys for Insert Mode
intelligent terminal : 2.3.1. Inserting New Text
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:17 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: J
joining lines (J) : 2.5. Joining Two Lines with J
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:18 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: L
line addresses : 5.2.1. Line Addresses
absolute : 5.2.2. Defining a Range of Lines
redefining current line : 5.2.5. Redefining the Current Line Position
relative : 5.2.3. Line Addressing Symbols
search patterns : 5.2.4. Search Patterns


symbols : 5.2.3. Line Addressing Symbols
line editor
1. The vi Text Editor
5.1. ex Commands
(see also ex editor)
(see also
looping in shell scripts : 7.4.1. Looping in a Shell Script
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:19 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: M
mapping
commands : 7.3.2. Using the map Command
examples : 7.3.4. Complex Mapping Example
editing multiple files : 7.3.5. More Examples of Mapping Keys
repeating long insertion : 7.3.5. More Examples of Mapping Keys
reusing a valid command key : 7.3.5. More Examples of Mapping Keys
surrounding word with font codes : 7.3.5. More Examples of Mapping Keys
transposing words : 7.3.5. More Examples of Mapping Keys
function keys : 7.3.7. Mapping Function Keys
insert mode : 7.3.6. Mapping Keys for Insert Mode
keys unused in vi : 7.3.2. Using the map Command
quoting special characters : 7.3.3. Protecting Keys from Interpretation by ex
special keys : 7.3.8. Mapping Other Special Keys
mark a place in a file (m) : 4.4. Marking Your Place
matching braces : 7.5.2. A Special Search Command
metacharacters
in replacement strings : 6.3.2. Metacharacters Used in Replacement Strings

in search patterns : 6.3.1. Metacharacters Used in Search Patterns
mode
command
1. The vi Text Editor
2.1. vi Commands
insert
2.1. vi Commands
7.3.6. Mapping Keys for Insert Mode
read-only : 4.2.2. Read-only Mode
Index
(1 of 2) [2/6/2001 10:03:20 PM]
move
combining with edit command
2.3.3.1. Words
4.1. More Command Combinations
range of lines (:m) : 5.2.2. Defining a Range of Lines
text (delete and put)
2.3.6. Moving Text
2.3.7. Copying Text
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:20 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: N
numeric arguments
with edit commands : 2.3.3.1. Words
with insert commands : 2.4.1. Numeric Arguments for Insert Commands
with movement commands : 2.2.2. Numeric Arguments
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:20 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: O
opening a file (vi)
1.1. Opening and Closing Files
1.1.1. Opening a File
1.1.2. Problems Opening Files
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:21 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: P
pattern matching : (see search and global replacement)
problem checklist : D. Problem Checklist
put text (p)
2.3.5.4. Problems with Deletions
2.3.6. Moving Text
2.3.7. Copying Text
2.6. Review of Basic vi Commands
4.3.2. Yanking to Named Buffers
put text (P)
2.3.6. Moving Text
2.3.7. Copying Text
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:23 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: Q
quick reference (vi and ex) : A. Quick Reference
quit
file (:q) : 5.3. Saving and Exiting Files
saving edits
:wq : 5.3. Saving and Exiting Files
:x : 5.3. Saving and Exiting Files
ZZ
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
without saving edits (:q!)
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
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:24 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: R
read-only mode : 4.2.2. Read-only Mode
reading in files : 5.4. Copying a File into Another File
recovering
buffers after a system crash : 4.2.3. Recovering a Buffer
deletions : 4.3. Making Use of Buffers

from numbered buffers
2.3.5.4. Problems with Deletions
4.3.1. Recovering Deletions
with u : 2.3.5.4. Problems with Deletions
redrawing the screen : 3.1.3. Redrawing the Screen
regular expressions
in replacement strings : 6.3.2. Metacharacters Used in Replacement Strings
in search patterns : 6.3.1. Metacharacters Used in Search Patterns
renaming buffers : 5.3.1. Renaming the Buffer
repeating last vi command (.)
2.3.8. Repeating or Undoing Your Last Command
2.3.8.1. Repeat
replace
character (r) : 2.3.3.3. Characters other
global : (see global replacement)
overstriking characters (R) : 2.4. More Ways to Insert Text
text : (see global replacement)
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
(1 of 2) [2/6/2001 10:03:24 PM]
Index
(2 of 2) [2/6/2001 10:03:24 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: S
saving files
1.1.3. Saving and Quitting a File
(see also vi commands)
screen editors
1. The vi Text Editor

(see also vi editor)
scripts
7.4. Using ex Scripts
(see also ex commands)
built by diff : 7.4.5. ex Scripts Built by diff
comments in : 7.4.4. Comments in ex Scripts
sort text blocks : 7.4.3. Sorting Text Blocks: A Sample ex Script
scrolling : 3.1. Movement by Screens
with cursor stationary (z) : 3.1.2. Repositioning the Screen with z
search
and replace : 6.2. Context-sensitive Replacement
and replace within text block : 6.4.2. Block Move by Patterns
backward for a pattern (?) : 3.3.1. Repeating Searches
combine opening a file with : 4.2.1. Advancing to a Specific Place
for general class of words : 6.4.1. Search for General Class of Words
global : (see global replacement)
ignoring case
6.3.2. Metacharacters Used in Replacement Strings
7.1.1. The :set Command
7.1.4. Some Useful Options
ignoring case (:set ic) : 6.3.2. Metacharacters Used in Replacement Strings
Index
(1 of 4) [2/6/2001 10:03:25 PM]
matched brackets : 7.5.2. A Special Search Command
metacharacters treated like normal characters : 7.1.4. Some Useful Options
pattern (/e) : 3.3. Movement by Searches
pattern matching
6.3. Pattern-matching Rules
(see also global replacement)
repeat (n, N)

3.3.1. Repeating Searches
6.1. Confirming Substitutions
within current line : 3.3.2. Current Line Searches
wrapping around file
3.3.1. Repeating Searches
7.1.4. Some Useful Options
set command (ex)
inquire about options : 7.1.1. The :set Command
options
7.1. Customizing vi
7.1.1. The :set Command
set line numbers (:set nu) : 2.2.3. Movement Within a Line
set options
allow metacharacters in searches (:set magic) : 7.1.4. Some Useful Options
alphabetical list of : B. Setting Environment Options
assign a value : 7.1.1. The :set Command
autoindent (:set ai) : 7.5.1. Indentation Control
display tabs (:set list) : 7.5.1. Indentation Control
exrc : 7.1.3. Alternate Environments
ignore case (:set ic)
7.1.1. The :set Command
7.1.4. Some Useful Options
number lines (:set nu)
3.4. Movement by Line Number
3.4.1. The G (Go To) Command if
5.2.2. Defining a Range of Lines
paragraphs (:set para=) : 3.2. Movement by Text Blocks
Index
(2 of 4) [2/6/2001 10:03:25 PM]
sections (:set sect=) : 3.2. Movement by Text Blocks

shiftwidth (:set sw=) : 7.5.1. Indentation Control
show matching brackets (:set sm) : 7.5.2. A Special Search Command
tabstop (:set ts=) : 7.5.1. Indentation Control
turn on or off : 7.1.1. The :set Command
window size (:set w=) : 7.1.1. The :set Command
wrapmargin (:set wm=)
2.1. vi Commands
2.2.3. Movement Within a Line
2.3.8.1. Repeat
7.1.4. Some Useful Options
map example : 7.3.5. More Examples of Mapping Keys
wrapscan (:set ws)
3.3.1. Repeating Searches
7.1.4. Some Useful Options
shell
commands
execute from vi : 7.2. Executing UNIX Commands
script
for loop : 7.4.1. Looping in a Shell Script
here documents : 7.4.2. Here Documents
sorting text blocks : 7.4.3. Sorting Text Blocks: A Sample ex Script
substitute
character (s) : 2.4. More Ways to Insert Text
line (S) : 2.4. More Ways to Insert Text
text (:s) : 5.1. ex Commands
substitution command (:s)
2.4. More Ways to Insert Text
6. Global Replacement
system crash
recovering from : 4.2.3. Recovering a Buffer

system crash, recovering from : 4.2.3. Recovering a Buffer
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | Y
Index
(3 of 4) [2/6/2001 10:03:25 PM]
Copyright © 1998 O'Reilly & Associates, Inc. All Rights Reserved.
Index
(4 of 4) [2/6/2001 10:03:25 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: T
tags for C code : 7.5.3. Using Tags
terminal
dumb
2.3.1. Inserting New Text
2.3.5.2. Lines
intelligent : 2.3.1. Inserting New Text
operations
/etc/termcap/file : 7.1. Customizing vi
termcap : 7.3.7. Mapping Function Keys
terminfo : 7.3.7. Mapping Function Keys
text blocks
sorting : 7.4.3. Sorting Text Blocks: A Sample ex Script
switching : 6.4.2. Block Move by Patterns
text editor : (see editor)
text object
2.3.3.1. Words
2.6. Review of Basic vi Commands
filter through command : 7.2.1. Filtering Text Through a Command
transposing
characters (xp) : 2.3.6.1. Transposing Two Letters
words : 7.3.5. More Examples of Mapping 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/6/2001 10:03:26 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: U
undoing
all vi commands on a line (U) : 2.3.8.2. Undo
last vi command (u)
2.3.5.4. Problems with Deletions
2.3.8. Repeating or Undoing Your Last Command
2.3.8.2. Undo
6.1. Confirming Substitutions
UNIX commands
compare files (diff) : 7.4.5. ex Scripts Built by diff
execute from vi : 7.2. Executing UNIX Commands
filter text through : 7.2.1. Filtering Text Through a Command
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:27 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: V
vi
entering : (see opening a file or vi commands)
invoking on multiple files : 5.5.1. Invoking vi on Multiple Files one
vi commands
@-functions : 7.3.9. @-Functions
abbreviated words : 7.3.1. Word Abbreviation
append text (a)

2.3. Simple Edits
2.3.2. Appending Text
append text to end of line (A) : 2.4. More Ways to Insert Text
case sensitivity of : 1. The vi Text Editor
change character (r) : 2.3.3.3. Characters other
change lines (cc)
2.3.3.2. Lines
2.4. More Ways to Insert Text
change text (c)
1. The vi Text Editor
2.3. Simple Edits
2.3.3. Changing Text
2.6. Review of Basic vi Commands
4.1. More Command Combinations
change text to end of line (C) : 2.3.3.2. Lines
change words (cw)
2.3.3. Changing Text
2.3.3.1. Words
combine edits and movement : 4.1. More Command Combinations
Index
(1 of 6) [2/6/2001 10:03:31 PM]
command mode : 2.1. vi Commands
copy (yank and put) text : 4.3.2. Yanking to Named Buffers
copy (yank) text (y)
1. The vi Text Editor
2.3. Simple Edits
2.3.7. Copying Text
2.6. Review of Basic vi Commands
4.1. More Command Combinations
copy text : 2.3. Simple Edits

copy text (yank and put)
2.3.7. Copying Text
4.3.2. Yanking to Named Buffers
delete character (x) : 2.3.5.3. Characters
delete line (dd) : 2.3.5.2. Lines
delete text (d)
2.3. Simple Edits
2.3.5. Deleting Text Chapter
2.3.7. Copying Text
2.6. Review of Basic vi Commands
4.1. More Command Combinations
delete to end of line (D) : 2.3.5.2. Lines
delete up to pattern (d/pattern) : 3.3.2. Current Line Searches
delete word (dw) : 2.3.5.1. Words
display current line number (^G)
3.4. Movement by Line Number
3.4.1. The G (Go To) Command if
filter text through UNIX command : 7.2.1. Filtering Text Through a Command
general form : 2.3.3.1. Words
insert mode : 2.1. vi Commands
insert text (i)
1. The vi Text Editor
2.1. vi Commands
2.3. Simple Edits
2.3.1. Inserting New Text
Index
(2 of 6) [2/6/2001 10:03:31 PM]
insert text at beginning of line (I) : 2.4. More Ways to Insert Text
join lines (J) : 2.5. Joining Two Lines with J
mapped to function keys : 7.3.7. Mapping Function Keys

mapping : 7.3.2. Using the map Command
mark a place in file (m) : 4.4. Marking Your Place
move cursor by character
2.2.1. Single Movements
2.6. Review of Basic vi Commands
move cursor by line
3.1.5. Movement by Line
3.1.5.1. Movement on the Current Line
move cursor by screen : 3.1. Movement by Screens
move cursor by text block : 3.2. Movement by Text Blocks
move cursor by word
2.2.4. Movement by Text Blocks
2.6. Review of Basic vi Commands
move cursor to line number n (nG)
3.4. Movement by Line Number
3.4.1. The G (Go To) Command if
move cursor within a line
2.2.3. Movement Within a Line
2.6. Review of Basic vi Commands
move cursor within a screen : 3.1.4. Movement Within a Screen
move text : 2.3. Simple Edits
move text (delete and put)
2.3.6. Moving Text
2.3.6.1. Transposing Two Letters
2.3.7. Copying Text
numeric arguments with
edit commands : 2.3.3.1. Words
insert commands : 2.4.1. Numeric Arguments for Insert Commands
movement commands : 2.2.2. Numeric Arguments
open a file (vi)

1.1. Opening and Closing Files
Index
(3 of 6) [2/6/2001 10:03:31 PM]
1.1.1. Opening a File
1.1.2. Problems Opening Files
open file : 4.2.1. Advancing to a Specific Place
at a specific place : 4.2.1. Advancing to a Specific Place
in read-only mode : 4.2.2. Read-only Mode
open line for text (O, o) : 2.4. More Ways to Insert Text
put text (p)
2.3. Simple Edits
2.3.5.4. Problems with Deletions
2.3.6. Moving Text
2.3.6.1. Transposing Two Letters
2.3.7. Copying Text
2.6. Review of Basic vi Commands
4.3.2. Yanking to Named Buffers
put text before cursor (P)
2.3.6. Moving Text
2.3.7. Copying Text
4.3.2. Yanking to Named Buffers
quick reference to : A. Quick Reference
quit and save edits (ZZ)
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
recover buffers after system crash : 4.2.3. Recovering a Buffer
recover deletions with u : 2.3.5.4. Problems with Deletions
recover numbered buffers (deletions)

2.3.5.4. Problems with Deletions
4.3.1. Recovering Deletions
repeat last command (.)
2.3.8. Repeating or Undoing Your Last Command
2.3.8.1. Repeat
6.1. Confirming Substitutions
repeat search (n, N)
Index
(4 of 6) [2/6/2001 10:03:31 PM]

×