
Learning the vi and Vim Editors, 7th Edition
Text Processing at Maximum Speed and Power
Publisher: O'Reilly Media
Release Date: June 2009
Pages: 494
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
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 make full use of vim:
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.
Table of Contents
-
Basic and Advanced vi
-
Chapter 1 The vi Text Editor
- A Brief Historical Perspective
- Opening and Closing Files
- Quitting Without Saving Edits
-
Chapter 2 Simple Editing
- vi Commands
- Moving the Cursor
- Simple Edits
- More Ways to Insert Text
- Joining Two Lines with J
- Review of Basic vi Commands
-
Chapter 3 Moving Around in a Hurry
- Movement by Screens
- Movement by Text Blocks
- Movement by Searches
- Movement by Line Number
- Review of vi Motion Commands
-
Chapter 4 Beyond the Basics
- More Command Combinations
- Options When Starting vi
- Making Use of Buffers
- Marking Your Place
- Other Advanced Edits
- Review of vi Buffer and Marking Commands
-
Chapter 5 Introducing the ex Editor
- ex Commands
- Editing with ex
- Saving and Exiting Files
- Copying a File into Another File
- Editing Multiple Files
-
Chapter 6 Global Replacement
- Confirming Substitutions
- Context-Sensitive Replacement
- Pattern-Matching Rules
- Pattern-Matching Examples
- A Final Look at Pattern Matching
-
Chapter 7 Advanced Editing
- Customizing vi
- Executing Unix Commands
- Saving Commands
- Using ex Scripts
- Editing Program Source Code
-
Chapter 8 Introduction to the vi Clones
- And These Are My Brothers, Darrell, Darrell, and Darrell
- Multiwindow Editing
- GUI Interfaces
- Extended Regular Expressions
- Enhanced Tags
- Improved Facilities
- Programming Assistance
- Editor Comparison Summary
- Nothing Like the Original
- A Look Ahead
-
-
Vim
-
Chapter 9 Vim (vi Improved): An Introduction
- Overview
- Where to Get Vim
- Getting Vim for Unix and GNU/Linux
- Getting Vim for Windows Environments
- Getting Vim for the Macintosh Environment
- Other Operating Systems
- Aids and Easy Modes for New Users
- Summary
-
Chapter 10 Major Vim Improvements over vi
- Built-in Help
- Startup and Initialization Options
- New Motion Commands
- Extended Regular Expressions
- Customizing the Executable
-
Chapter 11 Multiple Windows in Vim
- Initiating Multiwindow Editing
- Opening Windows
- Moving Around Windows (Getting Your Cursor from Here to There)
- Moving Windows Around
- Resizing Windows
- Buffers and Their Interaction with Windows
- Playing Tag with Windows
- Tabbed Editing
- Closing and Quitting Windows
- Summary
-
Chapter 12 Vim Scripts
- What’s Your Favorite Color (Scheme)?
- Dynamic File Type Configuration Through Scripting
- Some Additional Thoughts About Vim Scripting
- Resources
-
Chapter 13 Graphical Vim (gvim)
- General Introduction to gvim
- Customizing Scrollbars, Menus, and Toolbars
- gvim in Microsoft Windows
- gvim in the X Window System
- GUI Options and Command Synopsis
-
Chapter 14 Vim Enhancements for Programmers
- Folding and Outlining (Outline Mode)
- Auto and Smart Indenting
- Keyword and Dictionary Word Completion
- Tag Stacking
- Syntax Highlighting
- Compiling and Checking Errors with Vim
- Some Final Thoughts on Vim for Writing Programs
-
Chapter 15 Other Cool Stuff in Vim
- Editing Binary Files
- Digraphs: Non-ASCII Characters
- Editing Files in Other Places
- Navigating and Changing Directories
- Backups with Vim
- HTML Your Text
- What’s the Difference?
- Undoing Undos
- Now, Where Was I?
- What’s My Line (Size)?
- Abbreviations of Vim Commands and Options
- A Few Quickies (Not Necessarily Vim-Specific)
- More Resources
-
-
Other vi Clones
-
Chapter 16 nvi: New vi
- Author and History
- Important Command-Line Arguments
- Online Help and Other Documentation
- Initialization
- Multiwindow Editing
- GUI Interfaces
- Extended Regular Expressions
- Improvements for Editing
- Programming Assistance
- Interesting Features
- Sources and Supported Operating Systems
-
Chapter 17 Elvis
- Author and History
- Important Command-Line Arguments
- Online Help and Other Documentation
- Initialization
- Multiwindow Editing
- GUI Interfaces
- Extended Regular Expressions
- Improved Editing Facilities
- Programming Assistance
- Interesting Features
- elvis Futures
- Sources and Supported Operating Systems
-
Chapter 18 vile: vi Like Emacs
- Authors and History
- Important Command-Line Arguments
- Online Help and Other Documentation
- Initialization
- Multiwindow Editing
- GUI Interfaces
- Extended Regular Expressions
- Improved Editing Facilities
- Programming Assistance
- Interesting Features
- Sources and Supported Operating Systems
-
-
Appendixes
-
Appendix The vi, ex, and Vim Editors
- Command-Line Syntax
- Review of vi Operations
- vi Commands
- vi Configuration
- ex Basics
- Alphabetical Summary of ex Commands
-
Appendix Setting Options
- Solaris vi Options
- nvi 1.79 Options
- elvis 2.2 Options
- Vim 7.1 Options
- vile 9.6 Options
-
Appendix Problem Checklists
- Problems Opening Files
- Problems Saving Files
- Problems Getting to Visual Mode
- Problems with vi Commands
- Problems with Deletions
-
Appendix vi and the Internet
- Where to Start
- vi Web Sites
- A Different vi Clone
- Amaze Your Friends!
- Tastes Great, Less Filling
- vi Quotes
-
-
Colophon