Documente Academic
Documente Profesional
Documente Cultură
Home
E-mail Us
Oracle Articles
Oracle Training
Oracle Tips
Oracle Forum
Class Catalog
Remote DBA
Oracle Tuning
Emergency 911
RAC Support
Apps Support
Analysis
Design
Implementation
Oracle Support
Oracle Tips
Got Questions?
KEEP pool deprecated
in 12c
12c Poster Available!
Free AWR Report
Analysis
BEWARE of 11gR2
Upgrade Gotchas!
The vi editor provides commands for deleting or replacing single characters, single or
multiple words, and single or multiple lines of text. Table 9.4 shows some common
delete and replace commands with their associated actions. Remember you need to be
in command mode to use these.
Command
x
r
dw
dd
D
s
cw
cc
C
Action
Delete one character of text
Replace one character of text with the next character
entered
Delete entire word (3dw deletes 3 words)
Delete entire line (3dd deletes 3 lines)
Delete from cursor to end of line
Switch to insert mode after deleting current character
Delete entire word and switch to insert mode
Delete entire line and switch to insert mode
Change (delete and switch to insert mode) from cursor
position to end of line
Consulting Staff
Consulting Prices
Help Wanted!
Oracle Posters
Oracle Books
Oracle Scripts
Ion
Action
Search forward in the file for text
Search backward (up) in the file for text
With the cursor on a parentheses, bracket, or brace
character, you can press the % key to move the cursor to
its matching open or close character
Excel-DB
Don Burleson Blog
Instead of cutting or deleting text, it is also possible to copy text from a file using the
yank (yy) command. The yank command presents the option of copying text to one of
the specific named buffers. Where yy would copy the current line to the unnamed
default (unnamed), ?cyy would copy the current line to the buffer named c.
The issuance of multiple yank commands to the same buffer without intervening paste
commands will result in buffer overwrites. In other words, the user cannot yank line
five to buffer a, then yank line seven to buffer a and expect to be able to paste both
lines five and seven somewhere. When a user yanks line five, it is placed in buffer a as
requested, but when a command to yank line 7 to buffer a follows, line 7 will overwrite
line five, which is sitting in the buffer. This is one of the reasons for providing multiple
named buffers to use for multiple successive yanks. Table 9.6 shows copy and paste
commands and their associated actions.
Command
yy
?byy
5yy
p
P
?bP
Action
Copy (yank) the current line of text into the default
(unnamed) buffer
Copy (yank) the current line of text into the buffer named
b
Copy five lines of text to the default buffer
Paste the default buffer after the current cursor line
Paste the default buffer before the current cursor line
Paste the contents of named buffer b before the current
cursor line
Action
Join the current cursor line with the next line in the file
Split the current line at the cursor position when in insert
mode.
Undo the last change that was made
Undo any changes made to the current cursor line
Read the file named filename and insert it below the
current cursor line
Action
Append text to the right of the cursor
Insert text to the left of the cursor
Insert a new line below the current line
Append text to the end of the current line
Insert text at the beginning of the current line
Insert a new line above the current line
Insert Commands
To return to command mode from insert mode use the escape key.
Command
:w
:wq
<shift>ZZ
:w! newfile
Action
Write the file to disk
Write the file to disk and quit the editor
Same as :wq
Write the file to a new disk file called newfile
Write Commands
converted by W eb2PDFConvert.com
Command
h
j
k
l
^
$
b
w
e
G
:n
Enter
ctrl+b
ctrl+f
Action
Move cursor one position to the left (left arrow)
Move cursor one line down (down arrow)
Move cursor one line up (up arrow)
Move cursor one position to the right (right arrow)
Move to the beginning of the current line
Move cursor to the end of the current line
Move to beginning of previous word
Move to beginning of next word
Move to end of next word
Move to end of the file
Move to line n
Move to the first word one the next line
Page backward (up)
Page forward (down)
Cursor Movement
Command
x
r
dw
dd
D
s
cw
cc
C
Action
Delete one character of text
Replace one character of text with the next character
entered
Delete entire word (3dw deletes 3 words)
Delete entire line (3dd deletes 3 lines)
Delete from cursor to end of line
Switch to insert mode after deleting current character
Delete entire word and switch to insert mode
Delete entire line and switch to insert mode
Change (delete and switch to insert mode) from cursor
position to end of line
Action
Search forward in the file for text
Search backward (up) in the file for text
With the cursor on a parentheses, bracket, or brace
character, you can press the % key to move the cursor to
its matching open or close character
Search Commands
Command
yy
?byy
5yy
p
P
?bP
Action
Copy (yank) the current line of text into the default buffer
Copy (yank) the current line of text into the buffer named b
Copy five lines of text to the default buffer
Paste the default buffer after the current cursor line
Paste the default buffer before the current cursor line
Paste the contents of named buffer b before the current
cursor line
Action
Join the current cursor line with the next line in the file
Split the current line at the cursor position when in insert
mode.
Undo the last change that was made
Undo any changes made to the current cursor line
Read the file named filename and insert it below the current
cursor line
This is an excerpt from "Easy Linux Commands" by Linux guru Jon Emmons. You can
purchase it for only $19.95 (30%-off) at this link.
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
Note: This Oracle documentation was created as a support and Oracle training
reference for use by our DBA performance tuning consulting professionals.
Feel free to ask questions on our Oracle forum.
Verify experience! Anyone considering using the services of an Oracle support
expert should independently investigate their credentials and experience, and
not rely on advertisements and self-proclaimed expertise. All legitimate Oracle
experts publish their Oracle qualifications.
Errata? Oracle technology is changing and we strive to update our BC Oracle
support information. If you find an error or have a suggestion for improving our
content, we would appreciate your feedback. Just e-mail:
and include the URL for the page.
Burleson Consulting
The Oracle of Database Support
converted by W eb2PDFConvert.com