Learning the vi and Vim Editors, Seventh Edition

Text processing at maximum speed and power

By Arnold Robbins, Linda Lamb, Elbert Hannah
July 2008
Pages: 492
ISBN 10: 0-596-52983-X | ISBN 13: 9780596529833
starstarstarstarstar (4) (Average of 2 Customer Reviews)

Buy 2 Get 1 Free Free ShippingGuarantee

Description

The standard guide for vi since 1986, this book has been expanded to include detailed information on vim, the leading vi clone that includes extra features for both beginners and power users. You learn text editing basics and advanced tools for both editors, such as writing macros and scripts to extend the editor, power tools for programmers, multi-window editing -- all in the easy-to-follow style that has made this book a classic.
Full Description

There's nothing that hard-core Unix and Linux users are more fanatical about than their text editor. Editors are the subject of adoration and worship, or of scorn and ridicule, depending upon whether the topic of discussion is your editor or someone else's.

vi has been the standard editor for close to 30 years. Popular on Unix and Linux, it has a growing following on Windows systems, too. Most experienced system administrators cite vi as their tool of choice. And since 1986, this book has been the guide for vi.

However, Unix systems are not what they were 30 years ago, and neither is this book. While retaining all the valuable features of previous editions, the 7th edition of Learning the vi and vim Editors has been expanded to include detailed information on vim, the leading vi clone. vim is the default version of vi on most Linux systems and on Mac OS X, and is available for many other operating systems too.

With this guide, you learn text editing basics and advanced tools for both editors, such as multi-window editing, how to write both interactive macros and scripts to extend the editor, and power tools for programmers -- all in the easy-to-follow style that has made this book a classic.

Learning the vi and vim Editors includes:

A complete introduction to text editing with vi:
  • How to move around vi in a hurry
  • Beyond the basics, such as using buffers
  • vi's global search and replacement
  • Advanced editing, including customizing vi and executing Unix commands


  • How to make full use of vim:
  • Extended text objects and more powerful regular expressions
  • Multi-window editing and powerful vim scripts
  • How to make full use of the GUI version of vim, called gvim
  • vim's enhancements for programmers, such as syntax highlighting, folding and extended tags


  • Coverage of three other popular vi clones -- nvi, elvis, and vile -- is also included. You'll find several valuable appendixes, including an alphabetical quick reference to both vi and ex mode commands for regular vi and for vim, plus an updated appendix on vi and the Internet.

    Learning either vi or vim is required knowledge if you use Linux or Unix, and in either case, reading this book is essential. After reading this book, the choice of editor will be obvious for you too.



    Featured customer reviews

    Write a Review


    Glad to Finally Learn Vim,  December 29 2008
    Rating: StarStarStarStarStar
    Submitted by Anita Kuno   [Respond | View]

    I'm new. I'm new to vi and new to development. My first experience with vi was terrifying. I was configuring a server file with the assistance of a friend over IRC and was dropped into vi and have felt better in a car doing 360s on the highway in bad weather. After completing the server configuration, I resolved to learn Vim. I am grateful to Arnold Robbins, Elbert Hannah & Linda Lamb for producing such an accessible work. Since it is a reference book, "Learning the vi and Vim Editors, 7th Edition" has a broad spectrum of information. The portions for beginners are clear, straightforward and accessible.

    I found the sheer volume of commands overwhelming for a straight readthrough of the book. I did try to take in as much as I could but then found that I was unable to retain what I had read. So I choose a different approach and decided to take my time. The book sits at my elbow and as I work I use the index or appendix to locate the section or command that I require. The simple ones are becoming easier and I take time to investigate new sections when I have the inclination.

    My intent is not to do battle in the editor wars. There are much more worthy competitors than I. My goal was and is to understand the structure of the editor and work with the different modes that place vi in a category that is different from many editors such as gEdit. I don't know all the commands available in Vim, but I know that commands are possible. I haven't memorized all the different ways of inserting, substituting, and adding text, but I know there are options. Two of my early favourite commands are :e! (which takes you back to the last saved version of the file) and 'u', in command mode (which is the vi form of 'undo').

    There is a spell check feature available with Vim version 7 and I look forward to reading more about this feature and its commands in the Eighth Edition of this book because unfortunately it is not covered in this volume. Also, I noticed at a friend's behest, there is no section discussing dvorak keyboards interfacing with vi. I am a querty myself but I am told that vi commands behave oddly when directed from dvorak and perhaps this is worthy of study in subsequent editions.

    There are sections I haven't read yet and I might never read, the portions on nvi and Elvis haven't seemed applicable to me, so I may just pass on them. The book is valuable as a source for my level, which I would say is an experienced beginner. While there will be enhancements to new versions of vi and Vim, the basic commands will remain the same. Since vi is available with all versions of *nix, I am confident that what I am learning is universally useful and that is worth my effort.


    This will make you a power user,  November 10 2008
    Rating: StarStarStarStarStar
    Submitted by Tom   [Respond | View]

    Learning the vi and Vim Editors, Seventh edition, July 2008, by Arnold Robbins, Elbert Hannah and Linda Lamb is both a tutorial for beginners and a reference for experienced users. vi and several of its clones are covered in this edition: nvi, elvis, Vim, and vile. Chapters 9 through 15 cover Vim. Chapters 16, 17 and 18 cover nvi, elvis and vile, respectively. Including the index and appendices the book is 470 pages.

    The authors recommend that the reader know how to:
    • Enter Unix commands
    • Change directories
    • List files in a directory
    • Create, copy and remove files
    • Be familiar with grep and wildcard characters

    The Safari online edition of the book is free for the first 45 days and a useful companion to the hard copy. I prefer the outline numbering style of separating paragraphs and subparagraphs in the online book to the non-numbered style used in the hard copy.

    Explanations and examples are built upon a file called practice that is modified using the commands being explained. Most chapters end with a summary of the salient points including effective tabular presentations where applicable.

    I would like to see more information about Vim interfaces for Python and Ruby as referenced in Chapter 12.

    The writing style is pleasant and relaxed thus keeping the reader's interest while navigating examples of the many steps and options available in this powerful editor. The index is 24 pages, very good for a book of 446 pages and compares very favorably with other recently used texts. However the book binding and paper quality could be better. I have another recently purchased O’Reilly book that has not withstood frequent use as well as books from other publishers.

    Regardless of the above criticisms this is an excellent guide for the person willing to put forth the effort to become a power user of vi and its clones.

    Read all reviews


    Media reviews
    "In summary I think this is a fantastic book for anyone new to Vi/Vim but not so much for the more experienced Vi/Vim user... "
    -- Harry Tormey, BayPIGgies


    "If you're moving to Google Apps, you should make this a priority purchase. "
    -- Andy Hudson, Linux Format



    Read all reviews

    See larger cover