You are previewing Learning the vi and Vim Editors, 7th Edition.

Learning the vi and Vim Editors, 7th Edition

Cover of Learning the vi and Vim Editors, 7th Edition by Arnold Robbins... Published by O'Reilly Media, Inc.
  1. Dedication
  2. Special Upgrade Offer
  3. Preface
    1. Scope of This Book
    2. How the Material Is Presented
      1. Discussion of vi Commands
      2. Conventions
      3. Keystrokes
      4. Problem Checklist
    3. What You Need to Know Before Starting
    4. Comments and Questions
    5. Safari® Books Online
    6. About the Previous Editions
    7. Preface to the Seventh Edition
      1. What’s New
      2. Versions
      3. Acknowledgments from the Sixth Edition
      4. Acknowledgments for the Seventh Edition
  4. I. Basic and Advanced vi
    1. 1. The vi Text Editor
      1. A Brief Historical Perspective
      2. Opening and Closing Files
      3. Quitting Without Saving Edits
    2. 2. Simple Editing
      1. vi Commands
      2. Moving the Cursor
      3. Simple Edits
      4. More Ways to Insert Text
      5. Joining Two Lines with J
      6. Review of Basic vi Commands
    3. 3. Moving Around in a Hurry
      1. Movement by Screens
      2. Movement by Text Blocks
      3. Movement by Searches
      4. Movement by Line Number
      5. Review of vi Motion Commands
    4. 4. Beyond the Basics
      1. More Command Combinations
      2. Options When Starting vi
      3. Making Use of Buffers
      4. Marking Your Place
      5. Other Advanced Edits
      6. Review of vi Buffer and Marking Commands
    5. 5. Introducing the ex Editor
      1. ex Commands
      2. Editing with ex
      3. Saving and Exiting Files
      4. Copying a File into Another File
      5. Editing Multiple Files
    6. 6. Global Replacement
      1. Confirming Substitutions
      2. Context-Sensitive Replacement
      3. Pattern-Matching Rules
      4. Pattern-Matching Examples
      5. A Final Look at Pattern Matching
    7. 7. Advanced Editing
      1. Customizing vi
      2. Executing Unix Commands
      3. Saving Commands
      4. Using ex Scripts
      5. Editing Program Source Code
    8. 8. Introduction to the vi Clones
      1. And These Are My Brothers, Darrell, Darrell, and Darrell
      2. Multiwindow Editing
      3. GUI Interfaces
      4. Extended Regular Expressions
      5. Enhanced Tags
      6. Improved Facilities
      7. Programming Assistance
      8. Editor Comparison Summary
      9. Nothing Like the Original
      10. A Look Ahead
  5. II. Vim
    1. 9. Vim (vi Improved): An Introduction
      1. Overview
      2. Where to Get Vim
      3. Getting Vim for Unix and GNU/Linux
      4. Getting Vim for Windows Environments
      5. Getting Vim for the Macintosh Environment
      6. Other Operating Systems
      7. Aids and Easy Modes for New Users
      8. Summary
    2. 10. Major Vim Improvements over vi
      1. Built-in Help
      2. Startup and Initialization Options
      3. New Motion Commands
      4. Extended Regular Expressions
      5. Customizing the Executable
    3. 11. Multiple Windows in Vim
      1. Initiating Multiwindow Editing
      2. Opening Windows
      3. Moving Around Windows (Getting Your Cursor from Here to There)
      4. Moving Windows Around
      5. Resizing Windows
      6. Buffers and Their Interaction with Windows
      7. Playing Tag with Windows
      8. Tabbed Editing
      9. Closing and Quitting Windows
      10. Summary
    4. 12. Vim Scripts
      1. What’s Your Favorite Color (Scheme)?
      2. Dynamic File Type Configuration Through Scripting
      3. Some Additional Thoughts About Vim Scripting
      4. Resources
    5. 13. Graphical Vim (gvim)
      1. General Introduction to gvim
      2. Customizing Scrollbars, Menus, and Toolbars
      3. gvim in Microsoft Windows
      4. gvim in the X Window System
      5. GUI Options and Command Synopsis
    6. 14. Vim Enhancements for Programmers
      1. Folding and Outlining (Outline Mode)
      2. Auto and Smart Indenting
      3. Keyword and Dictionary Word Completion
      4. Tag Stacking
      5. Syntax Highlighting
      6. Compiling and Checking Errors with Vim
      7. Some Final Thoughts on Vim for Writing Programs
    7. 15. Other Cool Stuff in Vim
      1. Editing Binary Files
      2. Digraphs: Non-ASCII Characters
      3. Editing Files in Other Places
      4. Navigating and Changing Directories
      5. Backups with Vim
      6. HTML Your Text
      7. What’s the Difference?
      8. Undoing Undos
      9. Now, Where Was I?
      10. What’s My Line (Size)?
      11. Abbreviations of Vim Commands and Options
      12. A Few Quickies (Not Necessarily Vim-Specific)
      13. More Resources
  6. III. Other vi Clones
    1. 16. nvi: New vi
      1. Author and History
      2. Important Command-Line Arguments
      3. Online Help and Other Documentation
      4. Initialization
      5. Multiwindow Editing
      6. GUI Interfaces
      7. Extended Regular Expressions
      8. Improvements for Editing
      9. Programming Assistance
      10. Interesting Features
      11. Sources and Supported Operating Systems
    2. 17. Elvis
      1. Author and History
      2. Important Command-Line Arguments
      3. Online Help and Other Documentation
      4. Initialization
      5. Multiwindow Editing
      6. GUI Interfaces
      7. Extended Regular Expressions
      8. Improved Editing Facilities
      9. Programming Assistance
      10. Interesting Features
      11. elvis Futures
      12. Sources and Supported Operating Systems
    3. 18. vile: vi Like Emacs
      1. Authors and History
      2. Important Command-Line Arguments
      3. Online Help and Other Documentation
      4. Initialization
      5. Multiwindow Editing
      6. GUI Interfaces
      7. Extended Regular Expressions
      8. Improved Editing Facilities
      9. Programming Assistance
      10. Interesting Features
      11. Sources and Supported Operating Systems
  7. IV. Appendixes
    1. A. The vi, ex, and Vim Editors
      1. Command-Line Syntax
      2. Review of vi Operations
      3. vi Commands
      4. vi Configuration
      5. ex Basics
      6. Alphabetical Summary of ex Commands
    2. B. Setting Options
      1. Solaris vi Options
      2. nvi 1.79 Options
      3. elvis 2.2 Options
      4. Vim 7.1 Options
      5. vile 9.6 Options
    3. C. Problem Checklists
      1. Problems Opening Files
      2. Problems Saving Files
      3. Problems Getting to Visual Mode
      4. Problems with vi Commands
      5. Problems with Deletions
    4. D. vi and the Internet
      1. Where to Start
      2. vi Web Sites
      3. A Different vi Clone
      4. Amaze Your Friends!
      5. Tastes Great, Less Filling
      6. vi Quotes
  8. Index
  9. About the Authors
  10. Colophon
  11. Special Upgrade Offer
  12. Copyright
O'Reilly logo

Improved Facilities

All of the clones provide additional features that make simple text editing easier and more powerful:

Editing the ex command line

The ability to edit ex mode commands as you type them, possibly including a saved history of ex commands. Also, the ability to complete filenames and possibly other things, such as commands and options.

No line length limit

The ability to edit lines of essentially arbitrary length. Also, the ability to edit files containing any 8-bit character.

Infinite undo

The ability to successively undo all of the changes you’ve made to a file.

Incremental searching

The ability to search for text while you are typing the search pattern.

Left/right scrolling

The ability to let long lines trail off the edge of the screen instead of wrapping.

Visual mode

The ability to select arbitrary contiguous chunks of texts upon which some operation will be done.

Mode indicators

A visible indication of insert mode versus command mode, as well as indicators of the current line and column.

Command-Line History and Completion

Users of the csh, tcsh, ksh, zsh, and bash shells have known for years that being able to recall previous commands, edit them slightly, and resubmit them makes them more productive.

This is no less true for editor users than it is for shell users; unfortunately, Unix vi does not have any facility to save and recall ex commands.

This lack is remedied in each of the clones. Although each one provides a different way of saving and recalling the command history, ...

The best content for your career. Discover unlimited learning on demand for around $1/day.