Vi Quick Strue Manual (from WKS.UTS.OHIO-STATE.EDU)

xiaoxiao2021-03-06  76

original:

http://wks.uts.ohio-state.edu/unix_course/intro-134.html

http://wks.uts.ohio-state.edu/unix_course/)

Author: wks.uts.ohio-state.edu

[Next]

[Previous]

[UP]

[TOP]

[Contents]

Chapter 10 Editors

10.3 Vi Quick Reference Guide

All Commands in

Vi Are Precededed by pressing the escape key. Each time a different command company is to be entered, The escape key neseds to be used. Except where indicated,

Vi is case sensitive.

Cursor Movement Commands: (N) Idicates a Number, AND is Optional (N) H Left (n) Space (s) (N) J DOWN (N) Space (S) (N) K Up (n) Space (s) (n) L Right (n) Space (s) (the arrow keys usually work also) ^ f Forward One Screen ^ b Back ONE Screen ^ D Down Half Screen ^ Up Half Screen (^ Indicates Control Key;

Case does not matter H Beginning of Middle of Screen L Beginning of Line of Screen G Beginning of Line of Line (N) g move to beginning of line (n) 0 (ZERO) Beginning Of line $ end of line (n) w forward (n) word (s) (n) b back (n) word (s) e end of word inserting text: i Iinsert Text Before The Cursor a append method after the cursor does not overwrite other text) I insert text at the beginning of the line A append text to the end of the line r replace the character under the cursor with the next character typed R Overwrite characters until the end of the line (or until escape is Pressed to Change Command) O (Alpha O) Open New Line After The Current Line to Type Text O (Alpha O) Open New Line Before The Current Line to Type Text Deleting Text: DD DELETES CURRENT LINE (N) DD DELETES (N) Line (s) (n) DW deletes (n) word (s) d deletes from current character (n) x deletes (n) Character (s) x deletes previous ch Aracter Change Commands: (N) CC CHANGES (N) CHARACTERS ON LINE (s) Until End of the line (or untrictes of Word unssed) (or unscape isperated) (n) CW Changes CHEX THE CT (X) Changes Remaining Text On The CRRENES THE Escape Key ~ Changes The LetTer (X) Changes TEX TETOTOCAPE KEY ~ CHANGES The case of the current character J joins the current line and the next line u undo the last command just done on this line repeats last change s substitutes text for current character S substitutes text for current line:. s substitutes new word (s) for old S / OLD / New / G &

repeats last substitution. (: s) command (n) yy yanks (n) lines to buffer y (n) w yanks (n) words to buffer p puts yanked or deleted text after cursor P puts yanked or deleted text before cursor File Manipulation :: w (file): WQ WRITES CRANGES to CURRENT FILE AND QUITES EDIT SESSION: W! (file) Overwrites File: q Quits Edit Session W / No Changes made:! q quits edit session and discards changes: n edits next file in argument list: f (name) changes name of current file to (name): r (file) reads contents of file into current edit at the current cursor position ( INSERT A File:! (Command) Shell Escape: R! (Command) Inserts Result of Shell Command At Cursor Position ZZ Write Changes To Current File and ExitIntroduction To UNIX - 14 AUG 1996

[Next]

[Previous]

[UP]

[TOP]

[Contents]

转载请注明原文地址:https://www.9cbs.com/read-120603.html

New Post(0)