Linux vi编辑器

所需积分/C币:50 2018-10-29 22:13:56 985KB PDF
18
收藏 收藏
举报

全面介绍VI,有实例做练习,快速学习Linux经典的VI编辑器
vi( Tips, Ist ed. by Jacek Artymiak Editor: Suzanne trellis Published by devguide.net wwwhttp://www.devguide.net/books/vitipsi email:jacek@devguide.net Copyright C 2008 Jacek Artymiak All rights reserved No part of this publication may be reproduced stored in a retrieval system, or transmitted, in any form or by any means,electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher First edition 2008 Printed in poland and the United States of America o 8 IO98765432I ISBN:97883-68690o-0 The author and the publisher disclaim any and all liability for the use of information and programs contained in this book All trademarks mentioned in this book are the sole property of their owners Table of Contents IIntroduction Chapter I: Essentials PANIC! Canceling Command Switching Between Command Mode and Insert Mode Escaping from the ex editor mode Unscrambling the Screen Chapter 2: Basic File operations Starting vi(I) Starting vi(I) and Opening a File for Editing Starting vi() and Opening Multiple Files for Editin II Switching Between Files Opening a File after Starting vi(I) 14 Saving the current file Forcing vi(I to Save the Current File I6 Saving the current File Under a Different Name I7 Saving a part of the current file Saving a Part of the Current File Under a Different Name I9 Appending the Current File to another Appending a Part of the current file to Another 2I Saving the Current file and Quitting viI) Forcing vi(i)to Save the Current File and Quit 23 Table of contents d Quitting vi(I) without Saving the Current File Forcing vi(l to Quit without Saving the Current File Recovering the Current File 6 Chapter 3: Cursor Movement 27 Moving the cursor One character/line a Time Moving the Cursor x Characters or Lines at a Time Moving the cursor to column x Moving the Cursor to the start or end of line Moving the Cursor Between Lines 34 Which Line am i on? 36 Moving the Cursor relative to the vi(I Screen Moving the cursor to character x 40 Moving the Cursor Between Words Moving the cursor Between Sentences Moving the cursor Between Paragraphs Moving the cursor between matching 0,0,[,Or<> 47 Moving the Cursor Between Markers 8 Moving around with Simple search O Repositioning Text relatively to the Screen Chapter 4: Editing Entering Text 55 Inserting li g Ines Inserting Files ∞ Table of contents必 Inserting Output of a Command Processing Text Using External Commands 6 Changing Text Replacing text Replacing One or More Characters with Any Number of Characters 6 Replacing the Current line 70 Deleting Text 冮I Search and replace 77 Cut, Copy, and Paste 8e spying lext 80 Pasting text Joining lines Changing Case 86 Incrementing and Decrementing Numbers Repeating actions Undo/ Redo Chapter s: Tricks 89 Running commands 工 Sending vi(i to the Background Shell access 92 IIndex 95 List ofTables Table i UNIX filename wildcards I2 Table 2: Motion commands 66 Table 3: Regular expressions 6 IIntroduction No Unix-class system administrator or user will get far without learning the basics of vi(l), the widespread visual text mode editor Contrary to some misinformed opinions spread among users who are new to Unix-class systems, vi(I) is not difficult to learn. granted it is over thirty years old and not very friendly to beginners, but once you grasp the basic concepts, you will never have to learn another text editor again, because vi(I) is available for all standard operating systems, including Microsoft Windows, Mac osX, linux BSD, and many others My own experience teaching vi(I) and Unix-class system and network administration suggests that most of the problems reported by new users stem from the fact that vi(r)is completely different from any other text editor Vin is a modal editor, which means that you need to tell it to switch between different modes and commands even when all you want to do is change a few characters. This minor inconvenience is offset by the enormous flexibility of the editor and its seamless integration with the rest of the unix environment Another problem is the obscure terminology used to describe its functionality. It makes learning vi(I unnecessarily difficult for no good reason Bearing those two issues in mind, i have written a book which does not bombard you with the old terminology, but rather uses concepts that are familiar to users who are used to working with Microsoft Windows or Mac os x and who do not know much about the joys of working on dial-up text mode terminals I hope this fresh new look at vi(I) will help you learn it and become more productive acek artymiak age I

...展开详情
试读 110P Linux vi编辑器
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
上传资源赚积分or赚钱
    最新推荐
    Linux vi编辑器 50积分/C币 立即下载
    1/110
    Linux vi编辑器第1页
    Linux vi编辑器第2页
    Linux vi编辑器第3页
    Linux vi编辑器第4页
    Linux vi编辑器第5页
    Linux vi编辑器第6页
    Linux vi编辑器第7页
    Linux vi编辑器第8页
    Linux vi编辑器第9页
    Linux vi编辑器第10页
    Linux vi编辑器第11页
    Linux vi编辑器第12页
    Linux vi编辑器第13页
    Linux vi编辑器第14页
    Linux vi编辑器第15页
    Linux vi编辑器第16页
    Linux vi编辑器第17页
    Linux vi编辑器第18页
    Linux vi编辑器第19页
    Linux vi编辑器第20页

    试读结束, 可继续阅读

    50积分/C币 立即下载 >