加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 Learning the Vi and Vim Editors 7th Edition

Learning the Vi and Vim Editors 7th Edition.pdf

Learning the Vi and Vim Editors…

wasfv
2011-08-28 0人阅读 举报 0 0 暂无简介

简介:本文档为《Learning the Vi and Vim Editors 7th Editionpdf》,可适用于IT/计算机领域

LearningtheviandVimEditorsOtherresourcesfromO’ReillyRelatedtitlesviEditorPocketReferenceUnixinaNutshellClassicShellScriptingTheProductiveProgrammerUnixPowerToolsMacOSXforUnixGeeksoreillycomoreillycomismorethanacompletecatalogofO’ReillybooksYou’llalsofindlinkstonews,events,articles,weblogs,samplechapters,andcodeexamplesoreillynetcomistheessentialportalfordevelopersinterestedinopenandemergingtechnologies,includingnewplatforms,programminglanguages,andoperatingsystemsConferencesO’ReillyMediabringsdiverseinnovatorstogethertonurturetheideasthatsparkrevolutionaryindustriesWespecializeindocumentingthelatesttoolsandsystems,translatingtheinnovator’sknowledgeintousefulskillsforthoseinthetrenchesVisitconferencesoreillycomforourupcomingeventsSafariBookshelf(safarioreillycom)isthepremieronlinereferencelibraryforprogrammersandITprofessionalsConductsearchesacrossmorethan,booksSubscriberscanzeroinonanswerstotimecriticalquestionsinamatterofsecondsReadthebooksonyourBookshelffromcovertocoverorsimplyfliptothepageyouneedTryittodayforfreeSEVENTHEDITIONLearningtheviandVimEditorsArnoldRobbins,ElbertHannah,andLindaLambTomcat™TheDefinitiveGuideJasonBrittainandIanFDarwinBeijing•Cambridge•Farnham•Köln•Sebastopol•Taipei•TokyomaintitlePageiiiMonday,May,:AMLearningtheviandVimEditors,SeventhEditionbyArnoldRobbins,ElbertHannah,andLindaLambCopyright©ArnoldRobbins,ElbertHannah,andLindaLambAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,Inc,GravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(http:safarioreillycom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:orcorporateoreillycomEditor:AndyOramProductionEditor:SarahSchneiderCopyeditor:Genevieved’EntremontProofreader:SarahSchneiderIndexer:JoeWizdaCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrator:RobertRomanoPrintingHistory:July:SeventhEditionNovember:SixthEditionOctober:FifthEditionJune:FourthEditionAugust:ThirdEditionApril:SecondEditionFebruary:FirstEditionNutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,IncLearningtheviandVimEditors,thEdition,theimageofatarsier,andrelatedtradedressaretrademarksofO’ReillyMedia,IncManyofthedesignationsusesbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Incwasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinISBN:MTomywife,Miriam,foryourlove,patience,andsupportArnoldRobbins,SixthandSeventhEditionsTableofContentsPrefacexiiiPartIBasicandAdvancedviTheviTextEditorABriefHistoricalPerspectiveOpeningandClosingFilesQuittingWithoutSavingEditsSimpleEditingviCommandsMovingtheCursorSimpleEditsMoreWaystoInsertTextJoiningTwoLineswithJReviewofBasicviCommandsMovingAroundinaHurryMovementbyScreensMovementbyTextBlocksMovementbySearchesMovementbyLineNumberReviewofviMotionCommandsBeyondtheBasicsMoreCommandCombinationsOptionsWhenStartingviMakingUseofBuffersMarkingYourPlaceOtherAdvancedEditsReviewofviBufferandMarkingCommandsviiIntroducingtheexEditorexCommandsEditingwithexSavingandExitingFilesCopyingaFileintoAnotherFileEditingMultipleFilesGlobalReplacementConfirmingSubstitutionsContextSensitiveReplacementPatternMatchingRulesPatternMatchingExamplesAFinalLookatPatternMatchingAdvancedEditingCustomizingviExecutingUnixCommandsSavingCommandsUsingexScriptsEditingProgramSourceCodeIntroductiontotheviClonesAndTheseAreMyBrothers,Darrell,Darrell,andDarrellMultiwindowEditingGUIInterfacesExtendedRegularExpressionsEnhancedTagsImprovedFacilitiesProgrammingAssistanceEditorComparisonSummaryNothingLiketheOriginalALookAheadPartIIVimVim(viImproved):AnIntroductionOverviewWheretoGetVimGettingVimforUnixandGNULinuxGettingVimforWindowsEnvironmentsGettingVimfortheMacintoshEnvironmentOtherOperatingSystemsviii|TableofContentsAidsandEasyModesforNewUsersSummaryMajorVimImprovementsoverviBuiltinHelpStartupandInitializationOptionsNewMotionCommandsExtendedRegularExpressionsCustomizingtheExecutableMultipleWindowsinVimInitiatingMultiwindowEditingOpeningWindowsMovingAroundWindows(GettingYourCursorfromHeretoThere)MovingWindowsAroundResizingWindowsBuffersandTheirInteractionwithWindowsPlayingTagwithWindowsTabbedEditingClosingandQuittingWindowsSummaryVimScriptsWhat’sYourFavoriteColor(Scheme)DynamicFileTypeConfigurationThroughScriptingSomeAdditionalThoughtsAboutVimScriptingResourcesGraphicalVim(gvim)GeneralIntroductiontogvimCustomizingScrollbars,Menus,andToolbarsgviminMicrosoftWindowsgvimintheXWindowSystemGUIOptionsandCommandSynopsisVimEnhancementsforProgrammersFoldingandOutlining(OutlineMode)AutoandSmartIndentingKeywordandDictionaryWordCompletionTagStackingSyntaxHighlightingCompilingandCheckingErrorswithVimSomeFinalThoughtsonVimforWritingProgramsTableofContents|ixOtherCoolStuffinVimEditingBinaryFilesDigraphs:NonASCIICharactersEditingFilesinOtherPlacesNavigatingandChangingDirectoriesBackupswithVimHTMLYourTextWhat’stheDifferenceUndoingUndosNow,WhereWasIWhat’sMyLine(Size)AbbreviationsofVimCommandsandOptionsAFewQuickies(NotNecessarilyVimSpecific)MoreResourcesPartIIIOtherviClonesnvi:NewviAuthorandHistoryImportantCommandLineArgumentsOnlineHelpandOtherDocumentationInitializationMultiwindowEditingGUIInterfacesExtendedRegularExpressionsImprovementsforEditingProgrammingAssistanceInterestingFeaturesSourcesandSupportedOperatingSystemsElvisAuthorandHistoryImportantCommandLineArgumentsOnlineHelpandOtherDocumentationInitializationMultiwindowEditingGUIInterfacesExtendedRegularExpressionsImprovedEditingFacilitiesProgrammingAssistanceInterestingFeatureselvisFuturesx|TableofContentsSourcesandSupportedOperatingSystemsvile:viLikeEmacsAuthorsandHistoryImportantCommandLineArgumentsOnlineHelpandOtherDocumentationInitializationMultiwindowEditingGUIInterfacesExtendedRegularExpressionsImprovedEditingFacilitiesProgrammingAssistanceInterestingFeaturesSourcesandSupportedOperatingSystemsPartIVAppendixesAThevi,ex,andVimEditorsBSettingOptionsCProblemChecklistsDviandtheInternetIndexTableofContents|xiPrefaceTexteditingisoneofthemostcommontasksonanycomputersystem,andviisoneofthemostusefulstandardtexteditorsonasystemWithviyoucancreatenewfilesoreditanyexistingtextonlyfilevi,likemanyoftheclassicutilitiesdevelopedduringtheearlyyearsofUnix,hasareputationforbeinghardtonavigateBramMoolenaar’senhancedclone,Vim(“viImproved”),hasgonealongwaytowardremovingreasonsforsuchimpressionsVimincludescountlessconveniences,visualguides,andhelpscreensIthasbecomeprobablythemostpopularversionofvi,sothisseventheditionofthisbookdevotessevennewchapterstoitinPartII,VimHowever,manyotherworthyclonesofvialsoexistwecoverthreeoftheminPartIII,OtherviClonesScopeofThisBookThisbookconsistsofchaptersandappendixes,dividedintopartsPartI,BasicandAdvancedvi,isdesignedtogetyoustartedusingviquickly,andtofollowupwithadvancedskillsthatwillletyouuseiteffectivelyThefirsttwochapters,Chapter,TheviTextEditor,andChapter,SimpleEditing,presentsomesimplevicommandswithwhichyoucangetstartedYoushouldpracticetheseuntiltheyaresecondnatureYoucouldstopreadingattheendofChapter,havinglearnedsomeelementaryeditingtoolsButviismeanttodoalotmorethanrudimentarywordprocessingthevarietyofcommandsandoptionsenablesyoutoshortcutalotofeditingdrudgeryChapter,MovingAroundinaHurry,andChapter,BeyondtheBasics,concentrateoneasierwaystodotasksDuringyourfirstreading,you’llgetatleastanideaofwhatvicandoandwhatcommandsyoumightharnessforyourspecificneedsLater,youcancomebacktothesechaptersforfurtherstudyChapter,IntroducingtheexEditor,Chapter,GlobalReplacement,andChapter,AdvancedEditing,providetoolsthathelpyoushiftmoreoftheeditingburdentothecomputerTheyintroduceyoutotheexlineeditorunderlyingvi,andtheyshowyouhowtoissueexcommandsfromwithinvixiiiChapter,IntroductiontotheviClones,providesanintroductiontotheextensionsavailableinthefourviclonescoveredinthisbookItcentralizesinoneplacethedescriptionsofmultiwindowediting,GUIinterfaces,extendedregularexpressions,facilitiesthatmakeeditingeasier,andseveralotherfeatures,providingaroadmaptowhatfollowsintherestofthisbookItalsoprovidesapointertosourcecodefortheoriginalvi,whichcanbecompiledeasilyonmodernUnixsystems(includingGNULinux)PartII,Vim,describesVim,themostpopularvicloneintheearlypartofthestcenturyChapter,Vim(viImproved):AnIntroduction,providesageneralintroductiontoVim,includingwheretogetbinaryversionsforpopularoperatingsystemsandsomeofthedifferentwaystouseVimChapter,MajorVimImprovementsovervi,describesthemajorimprovementsinVimovervi,suchasbuiltinhelp,controloverinitialization,additionalmotioncommands,andextendedregularexpressionsChapter,MultipleWindowsinVim,focusesonmultiwindowediting,whichisperhapsthemostsignificantadditionalfeatureoverstandardviThischapterprovidesallthedetailsoncreatingandusingmultiplewindowsChapter,VimScripts,looksintotheVimcommandlanguage,whichletsyouwritescriptstocustomizeandtailorVimtosuityourneedsMuchofVim’seaseofuse“outofthebox”comesfromthelargenumberofscriptsthatotherusershavealreadywrittenandcontributedtotheVimdistributionChapter,GraphicalVim(gvim),looksatViminmodernGUIenvironments,suchasthosethatarenowstandardoncommercialUnixsystems,GNULinuxandotherUnixworkalikes,andMSWindowsChapter,VimEnhancementsforProgrammers,focusesonVim’suseasaprogrammer’seditor,aboveandbeyonditsfacilitiesforgeneraltexteditingOfparticularvaluearethefoldingandoutliningfacilities,smartindenting,syntaxhighlighting,andeditcompiledebugcyclespeedupsChapter,OtherCoolStuffinVim,isabitofacatchallchapter,coveringanumberofinterestingpointsthatdon’tfitintotheearlierchaptersPartIII,OtherviClones,describesthreeotherpopularviclones:nvi,elvis,andvileChapter,nvi:Newvi,Chapter,Elvis,andChapter,vile:viLikeEmacs,coverthevariousviclonesnvi,elvis,andvileshowingyouhowtousetheirextensionstovianddiscussingthefeaturesthatarespecifictoeachonePartIV,Appendixes,providesusefulreferencematerialxiv|PrefaceAppendixA,Thevi,ex,andVimEditors,listsallviandexcommands,sortedbyfunctionItalsoprovidesanalphabeticallistofexcommandsSelectedviandexcommandsfromVimarealsoincludedAppendixB,SettingOptions,listssetcommandoptionsforviandforallfourclonesAppendixC,ProblemChecklists,consolidateschecklistsfoundearlierinthebookAppendixD,viandtheInternet,describesvi’splaceinthelargerUnixandInternetcultureHowtheMaterialIsPresentedOurphilosophyistogiveyouagoodoverviewofwhatwefeelarevisurvivalmaterialsforthenewuserLearninganeweditor,especiallyaneditorwithalltheoptionsofvi,canseemlikeanoverwhelmingtaskWehavemadeanefforttopresentbasicconceptsandcommandsinaneasytoreadandlogicalmannerAfterprovidingthebasicsforvi,whichareusableeverywhere,wemoveontocoverVimindepthWethenroundoutourcoverageofthevilandscapebylookingatnvi,elvis,andvileThefollowingsectionsdescribetheconventionsusedinthisbookDiscussionofviCommandsApictureofakeyboardbutton,liketheoneontheleft,marksthemaindiscussionofthatparticularkeyboardcommandorofrelatedcommandsYouwillfindabriefintroductiontothemainconceptbeforeitisbrokendownintotaskorientedsectionsWethenpresenttheappropriatecommandtouseineachcase,alongwithadescriptionofthecommandandthepropersyntaxforusingitConventionsInsyntaxdescriptionsandexamples,whatyouwouldactuallytypeisshownintheCourierfont,asareallcommandnamesFilenamesarealsoshowninCourier,asareprogramoptionsVariables(whichyouwouldnottypeliterally,butwouldreplacewithanactualvaluewhenyoutypethecommand)areshowninCourieritalicBracketsindicatethatavariableisoptionalForexample,inthesyntaxline:vifilenamefilenamewouldbereplacedbyanactualfilenameThebracketsindicatethatthevicommandcanbeinvokedwithoutspecifyingafilenameatallThebracketsthemselvesarenottypediPreface|xvCertainexamplesshowtheeffectofcommandstypedattheUnixshellpromptInsuchexamples,whatyouactuallytypeisshowninCourierBold,todistinguishitfromthesystemresponseForexample:$lschxmlchxmlchxmlchxmlIncodeexamples,italicindicatesacommentthatisnottobetypedOtherwise,italicintroducesspecialtermsandemphasizesanythingthatneedsemphasisFollowingtraditionalUnixdocumentationconvention,referencesoftheformprintf()refertotheonlinemanual(accessedviathemancommand)Thisexamplereferstotheentryfortheprintf()functioninsectionofthemanual(youwouldtypemanprintfonmostsystemstoseeit)KeystrokesSpecialkeystrokesareshowninaboxForexample:iWithaESCThroughoutthebook,youwillalsofindcolumnsofvicommandsandtheirresults:KeystrokesResultsZZ"practice"Newfilelines,charactersGivethewriteandsavecommand,ZZYourfileissavedasaregularUnixfileIntheprecedingexample,thecommandZZisshownintheleftcolumnInthewindowtotherightisaline(orseverallines)ofthescreenthatshowtheresultofthecommandCursorpositionisshowninreversevideoInthisinstance,sinceZZsavesandwritesthefile,youseethestatuslineshownwhenafileiswrittenthecursorpositionisnotshownBelowthewindowisanexplanationofthecommandanditsresultSometimesvicommandsareissuedbypressingtheCTRLkeyandanotherkeysimultaneouslyInthetext,thiscombinationkeystrokeisusuallywrittenwithinabox(forexample,CTRLG)Incodeexamples,itiswrittenbyprecedingthenameofthekeywithacaret(^)Forexample,^GmeanstoholddownCTRLwhilepressingtheGkeyProblemChecklistAproblemchecklistisincludedinthosesectionswhereyoumayrunintosometroubleYoucanskimthesechecklistsandgobacktothemwhenyouactuallyencounteraproblemAlloftheproblemchecklistsarealsocollectedinAppendixC,foreaseofreferencexvi|PrefaceWhatYouNeedtoKnowBeforeStartingThisbookassumesyouhavealreadyreadLearningtheUnixOperatingSystem(O’Reilly),orsomeotherintroductiontoUnixYoushouldalreadyknowhowto:•Loginandlogout•EnterUnixcommands•Changedirectories•Listfilesinadirectory•Create,copy,andremovefilesFamili

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/49

Learning the Vi and Vim Editors 7th Edition

仅供在线阅读

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利