ExQuickReference Entering/leavingex %exnameeditname,startatend %ex+nname...atlinen %ex−ttagstartattag %ex−rlistsavedfiles %ex−rnamerecoverfilename %exname...editfirst;restvia:n %ex−Rnamereadonlymode :xexit,savingchanges :q!exit,discardingchanges Exstates Command Normalandinitialstate.Input promptedforby:.Yourkillcharactercancelspartialcommand. Insert Enteredbyaiandc.Arbitrary textthenterminateswithlinehavingonly.characteronitorabnormallywithinterrupt. Open/visual Enteredbyopenorvi,terminates withQorˆ \. Excommands abbrevabnextnunabbrevuna appendanumbernuundou argsaropenounmapunm changecpreservepreversionve copycoprintpvisualvi deletedputpuwritew editequitqxitx filefreadreyankya globalgrecoverrecwindowz insertirewindrewescape! joinjsetselshift< listlshellshprintnextCR mapsourcesoresubst& markmastopstrshift> movemsubstitutesscrollˆ D Excommandaddresses nlinen/patnextwithpat .current?patpreviouswithpat $lastx-nnbeforex +nextx,yxthroughy −previous´ xmarkedwithx +nnforward´ ´ previouscontext %1,$ Specifyingterminaltype %setenvTERMtypecshandallversion6 $TERM=type;exportTERMshinVersion7 Seealsotset(1) Someterminaltypes 262143adm31dw1h19 2645733adm3adw2i100 300s745c100gt40mime 33act4dm1520gt42owl 37act5dm2500h1500t1061 4014adm3dm3025h1510vt52 Initializingoptions EXINITplaceset’shereinenvironmentvar. setxenableoption setnoxdisableoption setx=valgivevalueval setshowchangedoptions setallshowalloptions setx?showvalueofoptionx Usefuloptions autoindentaisupplyindent autowriteawwritebeforechangingfiles ignorecaseicinscanning lisp(){}ares-exp’s listprintˆ Ifortab,$atend magic.[*specialinpatterns numbernunumberlines paragraphsparamacronameswhichstart... redrawsimulatesmartterminal scrollcommandmodelines sectionssectmacronames... shiftwidthswfor<>,andinputˆ D showmatchsmto)and}astyped slowopenslowchokeupdatesduringinsert windowvisualmodelines wrapscanwsaroundendofbuffer? wrapmarginwmautomaticlinesplitting Scanningpatternformation ↑beginningofline $endofline .anycharacter \<beginningofword \>endofword [str]anycharinstr [↑str]...notinstr [x−y]...betweenxandy *anynumberofpreceding ViQuickReference Entering/leavingvi %vinameeditnameattop %vi+nname...atlinen %vi+name...atend %vi−rlistsavedfiles %vi−rnamerecoverfilename %viname...editfirst;restvia:n %vi−ttagstartattag %vi+/patnamesearchforpat %viewnamereadonlymode ZZexitfromvi,savingchanges ˆ Zstopviforlaterresumption Thedisplay Lastline Errormessages,echoinginputto:/? and!,feedbackabouti/oandlarge changes. @linesOnscreenonly,notinfile. ˜ linesLinespastendoffile. ˆ xControlcharacters,ˆ ?isdelete. tabsExpandtospaces,cursoratlast. Vistates Command Normalandinitialstate.Othersreturn here.ESC(escape)cancelspartial command. Insert EnteredbyaiAIoOcCsSR. Arbitrarytextthenterminateswith ESCcharacter,orabnormallywith interrupt. Lastline Readinginputfor:/?or!;terminate withESCorCRtoexecute,interrupt tocancel. Countsbeforevicommands line/columnnumberzG| scrollamountˆ Dˆ U replicateinsertaiAI repeateffectmostrest Simplecommands dw deleteaword de ...leavingpunctuation dd deletealine 3dd...3lines itextESCinserttextabc cwnewESCchangewordtonew easESCpluralizeword xp transposecharacters Interrupting,cancelling ESCendinsertorincompletecmd ˆ ?(deleteorrubout)interrupts ˆ Lreprintscreenifˆ ?scramblesit Filemanipulation :wwritebackchanges :wqwriteandquit :qquit :q!quit,discardchanges :enameeditfilename :e!reedit,discardchanges :e+nameedit,startingatend :e+neditstartingatlinen :e#editalternatefile ˆ ↑synonymfor:e# :wnamewritefilename :w!nameoverwritefilename :shrunshell,thenreturn :!cmdruncmd,thenreturn :neditnextfileinarglist :nargsspecifynewarglist :fshowcurrentfileandline ˆ Gsynonymfor:f :tatagtotagfileentrytag ˆ ]:ta,followingwordistag Positioningwithinfile ˆ Fforwardscreenfull ˆ Bbackwardscreenfull ˆ Dscrolldownhalfscreen ˆ Uscrolluphalfscreen Ggotoline(enddefault) /patnextlinematchingpat ?patprevlinematchingpat nrepeatlast/or? Nreverselast/or? /pat/+nn’thlineafterpat ?pat?−nn’thlinebeforepat ]]nextsection/function [[previoussection/function %findmatching(){or} Adjustingthescreen ˆ Lclearandredraw ˆ Rretype,eliminate@lines zCRredraw,currentatwindowtop z−...atbottom z....atcenter /pat/z−patlineatbottom zn.usenlinewindow ˆ Escrollwindowdown1line ˆ Yscrollwindowup1line Markingandreturning `` previouscontext ´´ ...atfirstnon-whiteinline mxmarkpositionwithletterx ` xtomarkx ´ x...atfirstnon-whiteinline Linepositioning Hhomewindowline Llastwindowline Mmiddlewindowline +nextline,atfirstnon-white −previousline,atfirstnon-white CRreturn,sameas+ ↓orjnextline,samecolumn ↑orkpreviousline,samecolumn Characterpositioning ↑firstnonwhite 0beginningofline $endofline hor→forward lor←backwards ˆ Hsameas← spacesameas→ fxfindxforward Fxfbackward txuptoxforward Txbackuptox ;repeatlastfFtorT ,inverseof; |tospecifiedcolumn %findmatching({)or} Words,sentences,paragraphs wwordforward bbackword eendofword )tonextsentence }tonextparagraph (backsentence {backparagraph Wblankdelimitedword BbackW EtoendofW CommandsforLISP )Forwards-expression }...butdon’tstopatatoms (Backs-expression {...butdon’tstopatatoms Correctionsduringinsert ˆ Heraselastcharacter ˆ Weraseslastword eraseyourerase,sameasˆ H killyourkill,eraseinputthisline \escapesˆ H,youreraseandkill ESCendsinsertion,backtocommand ˆ ?interrupt,terminatesinsert ˆ Dbacktaboverautoindent ↑ˆ Dkillautoindent,savefornext 0ˆ D...butatmarginnextalso ˆ Vquotenon-printingcharacter Insertandreplace aappendaftercursor iinsertbefore Aappendatendofline Iinsertbeforefirstnon-blank oopenlinebelow Oopenabove rxreplacesinglecharwithx Rreplacecharacters Operators(doubletoaffectlines) ddelete cchange <leftshift >rightshift !filterthroughcommand =indentforLISP yyanklinestobuffer Miscellaneousoperations Cchangerestofline Ddeleterestofline ssubstitutechars Ssubstitutelines Jjoinlines xdeletecharacters X...beforecursor Yyanklines Yankandput pputbacklines Pputbefore "xpputfrombufferx "xyyanktobufferx "xddeleteintobufferx Undo,redo,retrieve uundolastchange Urestorecurrentline .repeatlastchange "dpretrieved’thlastdelete