Monday, September 27, 2010

FreeBSD editor VI (B)



0. Foreword
Vi command mode, this shows an executable command.
All the instructions are to enter the blue said.

For beginners, this section a bit complicated.
But what? To bubble experience, with a long time you will remember some of the natural order.
Do not bother to remember, because the commonly used natural unconsciously remember.
(Most likely, like me, fingers, remember, the brain remember .. QQ)

Note: said first hold down the ctrl key and then A. (Some commands can also be used lower case)
I always use lowercase.

1. Used mobile command:
the word down to move to the next one to appear.
cursor move up one screen.

move the cursor down a few lines (about 12 rows).

move the cursor down one screen.

move the cursor up a few lines (about 12 rows).

$ Move the cursor to the end of the line.

nG move to a line, n is the number of rows, if the file was not specified, the last line.

L Move the cursor to the next line of the screen the most.

^ Move to the line first non-space character.

2. Common file commands

display file information.
Shows the current file is changed, the location of the line.
file_name: unmodifIEd: line 1 of 380 [0%]

redraw the screen.

suspended edit back shell, available fg back to edit screen

switch to the recently edited files.
vi file_name file_name2
Life can use this command to switch the two files.

3. Common editing commands

Input:
I move the cursor to the first character Daoxing first and begin to accept input.

Copy:
Y copy the row to a temporary area (you can use yy)

Delete:
D from the current cursor position remove all the characters end Daoxing .. (you can use dd)

x delete a character cursor position

Replace:
! Shell command! Followed shell comd, and to shell cmd to replace the cursor to the line performance results.
If! Panda
The following information will be used to replace the original contents of line
bash: panda: command not found

r by r is followed by a character to replace the cursor of the characters.

~ Switch case of character cursor

Repeat:
n of the search before the search string (with / can)
If the first execution / BSD
Further implementation of n equal to the Executive / BSD
Search for anything if not previously have the following message
No previous search pattern.

Restoration:
U restore state to initial contact with the cursor state visit

u recover the effect produced by the previous action (ie replies)

Other:
: Implementation of the ex command

J to the next line with this line of the merger.

鈼?reference: vi (1)








相关链接:



CNNIC: Domain transfer fee does not exist



invoicing genuine SOFTWARE universal crisis



E-cology in the Pan Micro Series 46



Let my mailbox, "all set" to complete easy collection



Upgrading The Textile Industry Can Not "swap Chain"



Out Errors To Make Your Writing More Efficient CSS



DVR-MS to MPG



IPS detection and prevention simultaneously



Fireworks Produced the modal filter



SWF to MP4



Directory Desktop



A Brief Description Of JSF And Facelets



An EXAMPLE of Style



Directory Wizards And Components



Flash to MPEG



No comments:

Post a Comment