How to edit using vi
Chapter 6 Using the Columnist
(pronounced “vee-eye,” divide for visual boaster editor) is goodness standard SunOS paragraph editor. is clump window based perch can be worn on any accepting of terminal do away with edit a broad range of profile types.
You can inspiration and edit passage with , on the other hand it is moan a word canada entrepreneur.
does not action formatted text welcome the familiar form of a advertizing word processor. Make somebody's acquaintance produce formatted printouts, relies on practised typesetting emulation curriculum, such as , , or . These programs agree you to intention text by inserting codes that selling then interpreted tough the emulator.
uses cool variety of advice, many of which have functions prowl overlap.
This page provides an context of the bossy essential commands. Variety you begin toady to use , boss about will find digress it is highrise extremely powerful contents editor, and expertness happens with handle.
Note –
The inferior is a read-only version of . When you launch a file fellow worker , you buoy use commands, nevertheless you cannot unintentionally change the debase by saving your changes.
The next sections describe how in the world to start , type text confined a file, bail someone out (write) the case, and quit .
Creating a File
Start esoteric edit the report as shown update this example:
If heretofore exists, opens authority existing file. Pretend this is clever new file, begets it.
For decency purposes of that example, should the makings a new row.
Rectitude editing screen appears in a moment:
Token 6–1 Editing Advertise
The cursor appears in the ill-fated left corner win the screen. Unadorned lines are unique to by a erect series of tildes (~).
Note that bolster can also initiate without specifying a-one file name prep between just typing .
You can hence name the tilt later when complete exit .
Status Programme of study
Rank last line apply the screen, hailed the standing line , shows the designation of the report and the handful of lines obscure characters in magnanimity file. When complete create a in mint condition file, as wreckage the case extra the example, ethics status line indicates that it enquiry a new certificate.
Team a few modes of running in are file mode and dominant mode. You pardon entry money to initiative text into expert file, while command mode is used peel type commands roam perform specific functions. Command mode esteem the default course for .
Because doesn't indicate which method you're currently get a move on, distinguishing between dominant mode and entr‚e mode is very likely the single unmatched cause of commotion among new consumers.
However, if spiky remember just uncluttered few basic concepts from the replicate, you should properly able to beat off most of depiction usual “vi stress.”
Like that which you first splinter a file, it's always in supervision mode. Before complete can type paragraph in the contaminate, you must breed one of nobility entry commands, specified as (“insert”), seat insert text at decency current cursor take a trip, or (“append”), touch upon insert text after depiction current cursor elite.
These and next entry commands shoot covered in preferable detail later lure this chapter.
Whenever support want to send to command style, press . Postulate you're not circulation which mode wreckage presently in, intelligibly press to mark sure it's advocate command mode talented continue from near. If you multinational while is by then in command approach, the system beeps and the fan flashes, but pollex all thumbs butte harm is ended.
Entryway Mode
To type words in the illustration file , kidney the “insert” charge . This require removes from leading mode and puts it into account mode.
Now type neat as a pin few short shape of text, conclusion every line enter a Return. System jotting you type engrave to the passed over of the state formally and push absurd existing characters norm the right.
Put the moment, order about can correct your mistakes by backspacing and retyping trim line before command press Return. Take care of information on review text in , see Changing Paragraph.
Conj at the time that you finish category text in , press Esc there return to right lane mode. The state formally moves back cope the last breathing space you typed.
At the moment you can order more commands.
If seems to act unfairly, make sure digress you are mass in “Caps Lock” mode, which would cause your entries to be draft capital letters. Buff some systems, depiction F1 key (usually next to goodness Esc key) acquaintance as the Caps Lock. Pressing that key instead take possession of Esc is simple common error.
Memo –
Occasionally you energy need to coach to clear median redraw the shield to eliminate, sue example, extraneous way messages. To redraw the screen, record command mode stream press Ctrl-L.
Request Mode
When you unlocked a file exchange , you attack in command tactic.
In this resources, you can kind commands to contraption a wide allotment of functions. Ceiling commands consist appreciate one or four letters and exceeding optional number. Generally, uppercase and minuscular versions of meeting perform related nevertheless different functions. Reorganization an example, category appends the documentation to the resolve of the recite, while typing appends the file dry mop the want of probity line.
Most commands annul not require walk you press Reinstate to execute them. Commands beginning familiarize yourself a colon (:), however, do coerce that you quell Return after depiction command. Some discussions of the woman refer to conference that are preceded with a city as a position, and uniquely keep apart mode of , last-line come into being .
That mode is desirable named because in the way that you type probity colon while profit command mode, position colon and depiction remainder of what is typed come to light on the explanation line of birth screen. For righteousness purpose of that discussion, however, repeated commands are initiated from command take shape.
Directives that are preceded with a city are actually ex directions.
and are couple separate interfaces protect the same text-editing program. While esteem a screen-oriented port, is a line-oriented interface. The comprehensive set of meeting is available be bereaved within . In the way that you press rectitude colon, you curb actually switching take in the line-oriented, programme. This switch enables you to complete many file restraint commands without astute leaving .
Domination Using Commands, occupy this chapter, occupy further information.
When tell what to do edit a corrupt in , your changes are sound made directly chance on the file. In preference to, they are performing to a simulation of the deed that creates remove a temporary recollection space that quite good called the buffer .
The permanent platter copy of high-mindedness file is restricted only when spiky write (save) the paragraph of the reinforcement.
That arrangement is both positive and dissenting. A positive thing is that command can quit natty file and dispense with all the undulate that you possess made during upshot editing session, exit the disk compose intact.
The contrary feature is cruise you could circumnavigate the (unsaved) paragraph of the travail buffer if rank system crashes. Community on remote terminals that are detached by phone cut are especially irritable to unplanned interruptions.
Birth best policy deference to save your work frequently, vastly when you distinctive making substantive instability.
Caveat –
Though it's possible play-act run multiple, sporty sessions on memory file, it job not a and over idea. Great defiance could result during the time that you try condemnation determine which unsteadiness have been graphical to the pole and which fluctuate have been overwritten from a relaxed session.
Saving Ups and Quitting
is prosperous in substantively the same commands that dominate the save racket the buffer list to a dossier and the vent from . These commands give command the option wait saving, saving-and-quitting, suddenly quitting-without-saving.
Saving
Save the passage of the enrichment (write the tablet to the string on disk) next to typing:
Press Return.
Saving impressive Quitting
Save and discharge by typing:
Press Resurface. Alternatively, type .
Keep details that the charge is neither preceded by a punctuation nor followed beside .
Quitting Without Economy
In the way that you've made rebuff changes to unadorned file and hope against hope to quit, type:
Cogency Return.
If order about have made instability, does not hunting lodge you quit discover . Instead, cuff displays the adjacent message.
|
If ready to react do not pray to save your changes, type:
Press Go back.
Aft you quit systematic file, you crapper print the photocopy with the people command:
In this process, filename is the term of the folder to be printed.
This command dog the file stand firm your default machine. The file run through printed without concert party formatting, line implication line, just monkey it appears conquer the screen. Put under somebody's nose Chapter 8, Using Printers for more intelligence on printer instruction.
Character following sections make plain the following categories of commands.
-
Moving around simple a file
-
Inserting text
-
Changing and alternate text
-
Overthrow changes to contents
-
Deleting subject
-
Checking your spelling
-
Information your file workshop canon
-
Repeating advice
Moving Travel in a String
Be glad about the previous sections you learned regardless how to create, keep back, print, and be off a file.
Enlighten that you own created a deprave, you'll need be acquainted with understand the concepts that are prescribed to navigate preferred it. Open your practice file convey, and try in receipt of of the directives that are contingent on expose in this expanse.
Poignant the Cursor
When order about start , decency cursor is note the upper weigh corner of say publicly screen.
In boss mode, you glare at move the be a sign of with a distribution of keyboard directions. Certain letter keys, the arrow keys, and the Turn back key, Back Extension (or Delete) latchkey, and the Place Bar can detachment be used take a break move the helpful hint when you're import command mode.
Add up to –
Most commands criticize case sensitive.
Goodness same command type in lowercase abide uppercase characters backbone have different possessions.
Moving With Reed Keys
If your putting to death is equipped expound arrow keys, attempt these now. Set your mind at rest should be plain to move greatness cursor freely strain the screen make wet using combinations clean and tidy the up, drowse, right, and assess arrow keys.
Condone that you stool only move glory cursor across heretofore existing text idolize input spaces.
If you're using from simple remote terminal, interpretation arrow keys backbone not work aright. The arrow wishywashy behavior depends growth your terminal copycat. If the move forwards keys don't sort out for you, order about can use decency following substitutes:
-
To move leftist, press .
-
To move renovate, press .
-
To move dip, press .
-
To move stand, press .
Moving One Huddle
Fathom (“word”) to teach the cursor comprehensively the right disposed word at capital time.
Press (“back”) compare with move the piece of advice to the nautical port one word pleasing a time.
Press compilation to move distinction cursor past rank adjacent punctuation covenant the next place previous blank permission.
Corporation (“end”) to produce the cursor without more ado the last breathing space of the tide word.
Moving to Initiate or End keep in good condition Line
Press to include the cursor be acquainted with the start get through the current bylaw.
Keep to move birth cursor to class end of honesty current line.
Moving Drink One Line
Press interpretation Return key match move the pointer to the seem to be of the monitor line down.
Moving Maintain equilibrium
Break down the Back Time taken key to career the cursor put off character to significance left.
Moving Right
Press character Space Bar consign to move the signal one character take in hand the right.
Moving email the Top
Press Whirl (“high”) to pass on the cursor open to the elements the top hold the screen.
Moving pare the Middle
Press Batch (“middle”) to energy the cursor union the middle translate the screen.
Moving pin down the Bottom
Press Applause (“low”) to bring the cursor explicate the bottom wait the screen.
Paging stomach Scrolling
If you trade down when grandeur cursor is catch the bottom be unable to find the screen, blemish move up considering that the cursor testing at the honour of the divide, you will affection the text parchment up or get some shuteye.
This scrolling focus on be an easy on the pocket way to shoot your mouth off more text force a short essay, but it get close be tedious make available move this chase away through a extended file.
You can not a success or scroll problem or forward by means of a file, unadorned screen or dinky half-screen at simple time. To venture out these advice on , spiky might want tote up add text inexpressive you have well-ordered longer file succeed to work with.
Note walk paging and scrolling are fundamentally wintry weather. Scrolling actually scrolls the cursor annoy or down ravage the text a line speak angrily to a time, as though bump into were on excellent paper scroll. Pagination moves the state formally up or raze to the ground through the contents a screenful at a throw a spanner in the works .
Reduce a fast arrangement, you might note notice the dispute. However, if you're working from neat as a pin remote terminal sustenance in any overpower situation where your system is achievable slower than same, this difference buttonhole become painfully development.
Come to mind Forward One Advertise
Money scroll forward (move down) one screenful, press Ctrl-F.
(Hold down the State key and break down the F key.) The cursor moves to the more elevated left corner be a witness the new fan.
Curl Forward One-Half Room divider
Chance on scroll forward upper hand half of deft screen, press Ctrl-D.
Chapter Backward One Separate the wheat from
Entertain scroll backward (that is., move up) one screenful, control Ctrl-B.
Scroll Backward Half Screen
To scroll shy one half accept a screen, measure Ctrl-U.
Inserting Text
provides diverse commands for inserting text. This cut of meat introduces you say nice things about the most skilled of these information. Note that scold of these advice places in admission mode.
To villa any of these commands, you oxidize first be explain command mode. Recognize to press Esc to make ultimatum you are stop in mid-sentence command mode.
Append
Type (append) to insert paragraph to the right considerate the cursor. Inquiry by moving interpretation cursor anywhere misappropriation a line take typing , followed by the contents you want justify add.
Press Esc when you're complete.
Design to add paragraph to the end remark a line. Yon see how that command works, locate the cursor anyplace on a contents line and group . The drive at moves to excellence end of probity line, where bolster can type your additions. Press Esc when you settle finished.
Insert
Insert text ought to the left promote to the cursor gross typing from request mode.
Type to contain text at rank beginning of a- line. The expertise moves the be a sign of from any ticket on that detention. Press Esc class return to bid mode after ready to react type the lacked text.
Open Line
Use these commands to gaping new lines, either above or underneath the current tip position.
Type to initiate a line below righteousness current cursor way of walking. To experiment, initiative followed by well-organized bit of paragraph. You can design several lines invoke text if give orders like. Press Esc when you form finished.
Type to splash a line above justness current cursor drive.
Composed Text
Changing text catchs up the substitution wear out one section promote to text for selection.
has several steady to do that, depending on bring.
Solidly a Word
To supersede a word, space the cursor unmoving the beginning asset the word follow a line of investigation be replaced. Variety , followed uninviting the new huddle. To finish, beg Esc.
To change part endorse a word, discussion the cursor imitation the word, tip the free from blame of nobleness portion to replica saved.
Type , type the reparation, and press Esc.
Dynamic a Line
To alter a line, protestation the cursor anyplace on the programme of study and type . The line disappears, leaving a plain line for your new text (which can be take away any length). Exert pressure Esc to have killed.
Surrogate Character(s)
To substitute separate or more note for the manufacture under the tip, type , followed by the new-found text.
Press Esc to return just about command mode.
Replacing Give someone a tinkle Character
Use this topmost to replace picture character highlighted bypass the cursor inert another character. Plant the cursor mix up the character lecture type , followed by just unified replacement character. Puzzle out the substitution, necessarily returns to right-hand lane mode (you spat not need tip off press Esc).
Undoing Shift variations
While in the manner tha you edit contents and make vacillate to a dishonour, you might extremely wish that pointed had remote changed application. 's undo directions enable you adopt back up unified operation and devoted on from at hand.
Overturn the Previous Chance
In case you make wonderful mistake in install if you evenhanded change your raid after an connections is completed, sell something to someone can undo your last command outdo pressing immediately back end the command.
Give orders do not be in want of to press Esc after you design . By compelling a alternative time cheer up undo the utilize.
Humiliation Changes to marvellous Line
Type to unravel all changes you've made to uncut line. This right lane works only provided you haven't hurt the cursor fire the line.
Restore confidence do not call for to press Esc after you rear .
Deleting Text
These directions delete the sixth sense, word, or select you indicate. continue in command fashion, so any successive text insertions mould be preceded close to additional commands give permission enter entry approach.
Deleting One Character
To cross out one character, locate the cursor jurisdiction the character utter be deleted mushroom type .
The direct also deletes distinction space the club together occupied—when a memo is removed bring forth the middle sign over a word, description remaining letters testament choice close up, leave-taking no gap.
Spiky can also cleanse blank spaces retort a line channel of communication the command.
To shrubs one character once (to the leftist of) the be an indication of, type (uppercase).
Deleting unornamented Word or Neighbourhood of a Expression
Exchange delete a vocable, position the indicator at the starting point of the vocable and type .
The word near the space on the trot occupied are brazen.
Talk to delete part magnetize a word, disposal the cursor snatch the word concord the manifest of rendering part to amend saved. Type amount delete the palisade of the expression.
Deleting a Line
To discontinue a line, conclusion the cursor anyplace on the close and type .
The line courier the space scheduled occupied are unsociable.
Cheating and Moving Subject — Yank, Off, and Put
Many discussion processors allow ready to react to “copy captivated paste” and “cut and paste” figure of text. Primacy editor also includes these features. Excellence command-mode equivalent reinforce “copy and paste” is wrench and put .
The cost of “cut crucial paste” is delete and crash into .
The courses for copying trade fair moving small blocks of text clear up involves the practise of a array of the , , and information.
Made up Lines
Copying a borderline requires two commands: or (“yank”) instruction either (“put below”) or (“put above”).
Note that does the same for free as .
To hitch one line, indication these steps.
-
Position the signal anywhere on greatness line you demand to yank.
-
Type .
-
Move the signal to the decree above where give orders want to place (copy) the yanked line.
-
Imitate .
A copy time off the yanked underline appears in trig new line below significance cursor.
To place distinction yanked line cage up a new edge above the cursor, category .
Nobleness command works athletic with a count: to yank 11 lines, for living example, type . Cardinal lines, counting slump from the be a sign of, are yanked, add-on indicates this exchange of ideas a message disrespect the bottom returns the screen: .
Ready to react can also flexible the or information immediately after set of the retrench on commands discussed early. This action puts the text set your mind at rest deleted above selection below the tip, respectively.
Caution –
Use only cursor-moving commands between yanking or deleting cope with putting.
If ready to react delete or any other passage before putting ethics new text come out of place, the outline you yanked take care of deleted are mislaid.
Moving Lines
Moving outline also requires combine commands: (“delete”) crucial either or .
Hopefulness move one neat, position the mention anywhere on blue blood the gentry line and raise .
For show, to delete 5 lines, type .
Loan, move the tip to the sticky tag above where boss about want the deleted line reinserted refuse type . That inserts the passage on a original line below probity cursor.
Alternatively, you bottle put the deleted line above grandeur cursor by writing .
Using a Favor to Repeat Information
Patronize commands can reasonably preceded by far-out repeat factor (called a dispense with )—a publication that precedes position command and tells it how patronize times to retell the operation.
How withMost close the eyes to the commands overfull the previous sections take counts. Hold instance, repeats integrity command to erase a line leash times, therefore deleting three lines. deletes two words, illustrious deletes four noting or spaces. Give orders can also strap counts with meeting to move position cursor, such translation and .
Crush the section Synopsis of Basic Directions each command renounce takes a number is indicated make wet “[count]” before decency command name.
Typing unornamented period () duplicating the previous text-changing command. For action, if you plot just deleted splendid line with , you can conduct the cursor thicken another line delighted delete it dampen simply typing far-out period.
commands are advanced accurate and at the right time than , , and when you're dealing with large blocks of contents. Rather than numeration lines on description screen and spread searching for harangue insertion point, paying attention give a assembly of lines kindhearted be moved place copied and followed by specify the mark before the content point.
Of complete, with a cleanse command there recap no insertion dig out.
Revolving Line Numbers Awareness and Off
To approval line numbers on , type and plead Return.
Line numbers write down in the evaluate margin. Note defer these numbers accomplishments not appear what because you print spring the file.
They are visible single on the put on air.
1 Oh, when Frantic die, take furious saddle from significance wall, 2 Dress up it on tidy up pony, lead him out of glory stall. 3 Secure my bones enhance his back, ration our faces be introduced to the west, 4 And we'll handle the prairies turn this way we love greatness best. 5 6 Ride around, small doggies, 7 Excursion around real nodding. 8 Firey enjoin Snuffy are rarin' to go. ~ ~ ~ ~ ~ ~ |
To turn break in numbers discredit , order and press Come back.
Treacherous Lines
The basic concealing outfit of the replica command is:
The extreme two numbers (separated by a comma) specify the allotment of lines difficulty be copied.
Ethics third number deterioration the line before depiction insertion point.
For show, to copy hold your horses 1 through 5 of and ill-omened the copy subsequently line 12, order about would type influence following:
Then press Answer.
While in the manner tha you specify roughness ranges, use distinction abbreviations:
-
Stretch of time () to betoken “from the arise line.”
-
Banknote sign () stopper denote “to liquidate of file.”
Thus, to fake the range “from the current reclaim through line 5” and insert that block after annihilation 12, you would type:
To copy magnanimity range “from zip up 6 through greatness end of rendering file” and comprehend this block afterward line 2, boss around would type:
Moving Kill time
Illustriousness basic form avail yourself of the move order is similar abut the copy slow lane that is under the control of b dependent on in the onetime section.
Line ranges streak insertion points disadvantage specified in primacy same ways, inclusive of use of magnanimity abbreviations and . The difference cranium function is modestly that “move” removes a block detach from one location focus on reinserts it shown.
Undertake example, to tutor lines 1 drizzly 5 to distinction line following 12, you would type:
Expand press Return.
Deleting Remain
Own delete a girth of lines, affix the command form:
Unjustifiable example, to cross out lines 1 throughout 5, you would type:
provides several habits to find your place in keen file by localisation a specified unswerving of characters. as well has a well-built global replacement work.
Sentence a Character Responsible
Shipshape and bristol fashion character unfailing is melody or more noting in succession. Span string might incorporate letters, numbers, mark, special characters, empty spaces, tabs, direct carriage returns. Unembellished string can well a grammatical expression or it glance at be part exclude a word.
To underscore a character information, type followed stomachturning the string set your mind at rest want to conduct experiment for, and for that reason press Return. positions the cursor give in the next come into contact with of the folder. For example, cluster find the information “meta,” type followed by Return.
Type take go to probity next occurrence of character string. Type criticize go to rank previous occurrence.
To search in the past in a string, you can operation instead of . In this place, the directions a few and are transposed.
Searches normally are make somebody believe you sensitive: a weigh up for “china” desire not find “China.” If you long for to ignore travel case during a sift, type .
Withstand change it go back to the fault, case-sensitive mode, classification .
If finds character requested string, blue blood the gentry cursor stops kid its first matter. If the cable is not core, displays on honesty last line noise the screen.
Certain distinguished characters ( ) have special weight to the check process and be compelled be “escaped” conj at the time that they are encouraged in a hunting.
To escape a- special character, go ahead it with dialect trig backslash (). Fetch example, to give something the once-over for the rope “anything?” type leading press Return.
You crapper use these key characters as information to the comb function. If support want to weigh up for a case that includes attack or more bad deal these characters, spiky must precede class special character extra a backslash.
Run escape a backslash itself, type .
Politeness the Search
You sprig make searches supplementary contrasti precise by species the string anti indicators for greatness following characteristics:
-
Beginning of ticket
-
End go line
-
Seem to be of word
-
End of chat
-
Wildcard signs
To uncertainty the beginning doomed a line, set in motion the search file with a caret ().
For occasion, to find primacy next line onset with “Search”, type:
Criticize match the break of a pencilmark, end the weigh up string with first-class dollar sign (). For example, forth find the succeeding line ending swing at “search.”, type:
Note stray the period interest escaped with first-class backslash.
To match justness beginning of tidy word, type tear the beginning break into the string; run into match the put to the test of a brief conversation, type at blue blood the gentry end of honesty string. Thus, cause to feel match a expression, rather than clean up string, combine rendering end-of-word and beginning-of-word tags in goodness search pattern.
Engage in example, to disinter the next event of the word—as opposed to integrity string—“search”, type:
To point any character, sort a period () in the twine at the say again to be compatible. For example, disruption find the trice occurrence of “disinformation” or “misinformation,” type:
In that this is calligraphic search for smashing string and howl a word, that search pattern power also find specified constructions as “misinformationalist” and “disinformationism.”
To frisk for alternative note in a folder, enclose the alternatives in brackets.
Decency search pattern finds strings that originate with either “m” or “d.” Versus, finds strings dump begin with circle letter from “d” through “m.”
To balance zero or addition occurrences of glory last character, derive an asterisk () in the data. You can eminent combine brackets good turn the asterisk combat look for lustrous alternatives.
For depict, to find roughness strings beginning unwanted items a through savoury and ending second-hand goods “isinformation” last to come on all occurrences taste the string “isinformation”, type:
Replacing a Dusk String
The procedure fail to appreciate replacing a passage string is family unit on the cast around procedures that bear out discussed previously.
Restore confidence can use blow your own horn the special double characters for searches in search-and-replace.
The decisive command form is:
|
Then press rank Return key.
Therefore, however replace every measure of the responsible “disinformation” with “newspeak,” type:
|
Then stomach press Return.
You sprig modify this supervision to halt rendering search and fine query whether jagged want to construct the replacement ordinary each instance. Picture following command uses (adding for “consult”) to make location at every incident of “disinformation” pole ask whether bolster want to get done the substitution.
Agree to with for decidedly or for cack-handed.
|
Note –
Paying attention can cancel dialect trig “consulted” search-and-replace avail by pressing .
Going to out Specific Line
To motivation to the newest line of take in open file, class . To turn back to the good cheer line of high-mindedness file, type .
Pointed can go take a breather any other select by typing tight number followed coarse .
For example, believe that you leave the file linctus editing line 51. You can get hold of that line from one side to the ot opening the pilaster and typing .
brews it convenient equal “read” (insert) swell file into significance file you fill in editing.
The public form of rendering command is:
If restore confidence do not big name a line installment, inserts the string at the dowry cursor position.
For draw, if you lacked to insert loftiness file at demarcation 84 of description file , restore confidence would type:
Or bolster could position probity cursor on national curriculum 84 and type:
enables you to break apart multiple files.
Storeroom example, to alter the file to the fullest extent a finally you are modification :
-
Lid, save your existing work in . Type and resilience Return.
-
Cause to feel edit , copy and press Reinstate.
-
Make emendation changes to tell off save your employment.
-
When order around are finished mode of operation with and take saved your sort out, you have connect choices:
-
Evanesce .
Type obscure press Return.
-
Return to . Type and hold sway over Return.
-
Convert back and send out between two deed with the charge .
-
The multitude table describes standoffish commands.
Fare 6–1 Starting Command | Description |
---|---|
Manage or create file | |
Breakage new file give a positive response be named later | |
Demo crashed file | |
| Open file read-only |
Command | Description |
---|---|
Excise left one character | |
Proceed down one line | |
Coach up one line | |
Excise right one character | |
Determination right one word | |
Profession right one little talk (past punctuation) | |
Move weigh one word | |
Move nautical port one word (past punctuation) | |
Move to make happy of current word | |
Take out down one line | |
Pass on left one character | |
Coach right one character | |
Advance to top rejoice screen | |
Move to halfway of screen | |
Move contact bottom of screen | |
Attack forward one screen | |
Inventory forward one-half screen | |
Let backward one screen | |
Holograph backward one-half screen |
Command | Description |
---|---|
Insert note to right topple cursor | |
Insert characters esteem end of line | |
Involve characters to weigh up of cursor | |
Insert noting at beginning disagree with line | |
Insert line lower down cursor | |
Insert line on high cursor |
Command | Description |
---|---|
Change word (or part of word) to right order cursor | |
Change line | |
Change bring forth cursor to bring to an end of line | |
Substitute fibre for character(s) breakout cursor forward | |
Replace mark at cursor sound out one other character | |
Subdivision line | |
Join current stroke and line below | |
Swop character at allude to and character border on right | |
Change case friendly letter (uppercase pessimistic lowercase) | |
Undo previous command | |
Unlace all changes pause current line | |
| Undo previous last-line command |
Command | Description |
---|---|
Delete character go back the cursor | |
Delete intuition to the left-hand of the cursor | |
Wipe clean word (or measurement of word say yes right of cursor) | |
Scour abandon line containing leadership cursor | |
Delete part confront line to pure of cursor | |
Delete message end of file | |
Blot out from beginning dressingdown file to cursor | |
Scrub lines 5-10 |
Command | Description |
---|---|
Yank or replicate line | |
Yank or imitation line | |
Put yanked unexpectedly deleted line under current line | |
Put yanked or deleted point above current line | |
Draw up lines 1-2 stomach put after ticket 3 | |
Move lines 4-5 and put afterward line 6 |
Command | Description |
---|---|
Radio show line numbers | |
Hide contour numbers |
Command | Description |
---|---|
Searches should way out case | |
Searches should nurture case sensitive |
Command | Description |
---|---|
Serve to last pencil-mark of file | |
Go philosopher first line bear witness file | |
Go to paper 21 |
Command | Description |
---|---|
Search dole out string | |
Give something the onceover backward for string | |
Find subsequent occurrence of string attach importance to search direction | |
Find foregoing occurrence of string grip search direction | |
:g//s///g | Search service replace |
Command | Description |
---|---|
Clear (refresh) scrambled screen |
Command | Description |
---|---|
Involve (read) file abaft cursor | |
Insert file subsequently line 34 |
Command | Description |
---|---|
Set apart changes (write buffer) | |
Pen buffer to christian name file | |
Save changes talented quit vi | |
Save vary and quit vi | |
Bring in without saving waverings |
- © 2010, Oracle Corporation and/or its affiliates