BN.com Gift Guide

Learning the vi Editor

Overview

For many users, working in the Unix environment means using vi, a full-screen text editor available on most Unix systems. Even those who know vi often make use of only a small number of its features.Learning the vi Editor is a complete guide to text editing withvi. Topics new to the sixth edition include multiscreen editing and coverage of fourviclones: vim, elvis, nvi, and vile and their enhancements to vi, such as multi-window editing, GUI interfaces, extended regular expressions, and enhancements for ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (48) from $1.99   
  • New (4) from $6.13   
  • Used (44) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$6.13
Seller since 2014

Feedback rating:

(100)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Ships same day. Very slight shelf wear.Tracking included

Ships from: Hastings, MI

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$6.31
Seller since 2014

Feedback rating:

(11)

Condition: New
1998-11-11 Paperback Sixth Edition New Edition: Sixth Edition; New, We ship one business day with tracking number. We do not ship to CANADA, GU, PR, Hawaii and Alaska.

Ships from: hayward, CA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$50.00
Seller since 2014

Feedback rating:

(194)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$50.00
Seller since 2014

Feedback rating:

(194)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

For many users, working in the Unix environment means using vi, a full-screen text editor available on most Unix systems. Even those who know vi often make use of only a small number of its features.Learning the vi Editor is a complete guide to text editing withvi. Topics new to the sixth edition include multiscreen editing and coverage of fourviclones: vim, elvis, nvi, and vile and their enhancements to vi, such as multi-window editing, GUI interfaces, extended regular expressions, and enhancements for programmers. A new appendix describes vi's place in the Unix and Internet cultures.Quickly learn the basics of editing, cursor movement, and global search and replacement. Then take advantage of the more subtle power of vi. Extend your editing skills by learning to use ex, a powerful line editor, from within vi. For easy reference, the sixth edition also includes a command summary at the end of each appropriate chapter.Topics covered include:

  • Basic editing
  • Moving around in a hurry
  • Beyond the basics
  • Greater power with ex
  • Global search and replacement
  • Customizing vi and ex
  • Command shortcuts
  • Introduction to the vi clones' extensions
  • The nvi, elvis, vim, and vile editors
  • Quick reference to vi and ex commands
  • vi and the Internet


The venerable vi full screen text editor is still soldering on, and this updated and revised sixth edition is still the complete guide for vi, the four vi clones (nvi, elvis, vim and vile) and their extensions. This tutorial guides you through the basics of vi and into the nooks, crannies and subtleties of advanced vi editing.

Read More Show Less

Editorial Reviews

Regan Russell

Getting Windows users away from their easy-to-use GUI-based systems -- particularly editors -- can be like pulling teeth. It is almost as much fun as getting avid UNIX aficionados to learn to live with Windows' frequent crashes.

In the UNIX world, the vi editor is ubiquitous. And since it has even been ported to DOS (and therefore is usable within Windows), it is one editor worth learning. Once you learn the basics, you usually find that many advanced commands are easily picked up because of the intuitive consistency of the editor's commands.

Learning the vi Editor, by Linda Lamb, has been through six editions, which means that the book is successful enough for the publisher to keep printing, and that most of the errors and omissions have been eliminated. Possible reasons for the long life of this book may be its price, the continued popularity of UNIX, and ubiquity of the program. Another factor may be that Learning the vi editor is a book small enough that you can flick through it quickly as a desktop reference, yet it is large enough that even experienced UNIX programmers can find one or two obscure features covered. There is something Zen-like in this balance of not putting in too much or too little.

The first three chapters cover simple editing; enough for novices to become reasonably productive within a day. The remaining four chapters cover power features such as buffer manipulation, global search-and-replace, and the kind of advanced editing techniques you normally use a macro language for in other editors. As an aside, vi is interesting on several levels: the command language for vi is Turing-complete, which means it is as computationally expressive as traditional third-generation programming languages such as BASIC or PASCAL. Also, vi is usually implemented such that renaming it or accessing by a symbolic link under a different name changes its behavior: it interrogates argv[0] and acts accordingly. vi and ex, for instance, are the same program.

Learning the vi Editor has four appendices: the first is a quick reference placed three quarters of the way through the book and requires a bookmark to find quickly; the second outlines rarely used environment settings; the third covers ex commands; and the final appendix is a simple problem check list.
Electronic Review of Computer Books

Read More Show Less

Product Details

  • ISBN-13: 9781565924260
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 11/28/1998
  • Series: Nutshell Handbooks Series
  • Edition description: Sixth Edition
  • Edition number: 6
  • Pages: 352
  • Product dimensions: 6.62 (w) x 8.50 (h) x 0.85 (d)

Meet the Author

Arnold Robbins, an Atlanta native, is a professional programmer and technical author. He has worked with Unix systems since 1980, when he was introduced to a PDP-11 running a version of Sixth Edition Unix. He has been a heavy AWK user since 1987, when he became involved with gawk, the GNU project's version of AWK. As a member of the POSIX 1003.2 balloting group, he helped shape the POSIX standard for AWK. He is currently the maintainer of gawk and its documentation. He is also coauthor of the sixth edition of O'Reilly's Learning the vi Editor. Since late 1997, he and his family have been living happily in Israel.

Read More Show Less

Read an Excerpt


Chapter 2: Simple Editing

In this chapter
  • vi Commands
  • Moving the Cursor
  • Simple Edits
  • More Ways to Insert Text
  • Joining Two Lines with J
  • Review of Bask vi Commands
This chapter introduces you to editing with vi, and it is set up to be read as a tutorial. In it you will learn how to move the cursor and how to make some simple edits. If you've never worked with vi, you should read the entire chapter.

Later chapters show you how to expand your skills to perform faster and more powerful edits. One of the biggest advantages for an adept user of vi is that there are so many options to choose from. (One of the biggest disadvantages for a newcomer to vi is that there are so many different editor commands.)

You can't learn vi by memorizing every single vi command. Start out by learning the basic commands introduced in this chapter. Note the patterns of use that the commands have in common.

As you learn vi, be on the lookout for more tasks that you can delegate to the editor, and then find the command that accomplishes it. In later chapters you will learn more advanced features of vi, but before you can handle the advanced, you must master the simple.

This chapter covers:

  • Moving the cursor
  • Adding and changing text
  • Deleting, moving, and copying text
  • More ways to enter insert mode

vi Commands

vi has two modes: command mode and insert mode. As soon as you enter a file, you are in command mode, and the editor is waiting for you to enter a command. Commands enable you to move anywhere in the file, to perform edits, or to enter insert mode to add new text. Commands can also be given to exit the file (saving or ignoring your edits) in order to return to the UNIX prompt.

You can think of the different modes as representing two different keyboards. In insert mode, your keyboard functions like a typewriter. In command mode, each key has a new meaning or initiates some instruction.

There are several ways to tell vi that you want to begin insert mode. One of the most common is to press i. The i doesn't appear on the screen, but after you press it, whatever you type will appear on the screen and will be entered into the buffer. The cursor marks the current insertion point. To tell vi that you want to stop inserting text, press ESC. Pressing ESC moves the cursor back one space (so that it is on the last character you typed) and returns vi to command mode.

For example, suppose you have opened a new file and want to insert the word "introduction". If you type the keystrokes iintroduction, what appears on the screen is:

introduction

When you open a new file, vi starts in command mode and interprets the first keystroke ( i ) as the insert command. All keystrokes made after the insert command are considered text until you press ESC If you need to correct a mistake while in insert mode, backspace and type over the error. Depending on the type of terminal you are using, backspacing may erase what you've previously typed or may just back up over it. In either case, whatever you back up over will be deleted. Note that you can't use the backspace key to back up beyond the point where you entered insert mode.

vi has an option that lets you define a right margin and provides a carriage return automatically when you reach it. For right now, while you are inserting text, press RETURN 1 to break the lines.

Sometimes you don't know whether you are in insert mode or command mode. Whenever vi does not respond as you expect, press ESC once or twice to check which mode you are in. When you hear the beep, you are in command mode.

Moving the Cursor

You may spend only a small amount of time in an editing session adding new text in insert mode; much of the time you will be making edits to existing text.

In command mode you can position the cursor anywhere in the file. Since you begin all basic edits (changing, deleting, and copying text) by placing the cursor at the text that you want to change, you want to be able to move the cursor to that place as quickly as possible.

There are vi commands to move the cursor:

  • Up, down, left, or right-one Character at a time
  • Forward or backward by blocks of text such as words, sentences, or paragraphs
  • Forward or backward through a file, one screen at a time

Single Movements

The keys h j, k, and 1, right under your fingertips, will move the cursor:
h left, one space
j down, one line
k up, one line
1 right, one space

You can also use the cursor arrow keys ( <--, -->), + and - to go up and down, or the RETURN and I BACKSPace keys, but they are out of the way, and the arrow keys are not supported by all terminals. At first, it may seem awkward to use letter keys instead of arrows for cursor movement. After a short while, though, you'll find it is one of the things you'll like best about vi-you can move around without ever taking your fingers off the center of the keyboard.

Before you move the cursor, press ESC to make sure that you are in command mode. Use h, j, k, and 1 to move forward or backward in the file from the current cursor position. When you have gone as far as possible in one direction, you hear a beep and the cursor stops. For example, once you're at the beginning or end of a line, you cannot use h or 1 to wrap around to the previous or next line; you have to use j or k.* Similarly, you cannot move the cursor past a tilde representing a line without text, nor can you move the cursor above the first line of text.

Numeric Arguments

You can precede movement commands with numbers. Figure 2-2 shows how the command 41 moves the cursor four spaces to the right, just as if you had typed 1 four times (1111).

The ability to multiply commands gives you more options and power for each command you learn. Keep it in mind as you are introduced to additional commands. . . .

Read More Show Less

Table of Contents

Dedication;
Preface;
Scope of This Handbook;
How the Material Is Presented;
What You Need to Know Before Starting;
Comments and Questions;
About the Previous Edition;
Preface tothe6th Edition;
Basic and Advanced vi;
Chapter 1: The vi Text Editor;
1.1 Opening and Closing Files;
1.2 Quitting Without Saving Edits;
Chapter 2: Simple Editing;
2.1 vi Commands;
2.2 Moving the Cursor;
2.3 Simple Edits;
2.4 More Ways to Insert Text;
2.5 Joining Two Lines with J;
2.6 Review of Basic vi Commands;
Chapter 3: Moving Around in a Hurry;
3.1 Movement by Screens;
3.2 Movement by Text Blocks;
3.3 Movement by Searches;
3.4 Movement by Line Number;
3.5 Review of vi Motion Commands;
Chapter 4: Beyond the Basics;
4.1 More Command Combinations;
4.2 Options When Starting vi;
4.3 Making Use of Buffers;
4.4 Marking Your Place;
4.5 Other Advanced Edits;
4.6 Review of vi Buffer and Marking Commands;
Chapter 5: Introducing the ex Editor;
5.1 ex Commands;
5.2 Editing with ex;
5.3 Saving and Exiting Files;
5.4 Copying a File into Another File;
5.5 Editing Multiple Files;
Chapter 6: Global Replacement;
6.1 Confirming Substitutions;
6.2 Context-Sensitive Replacement;
6.3 Pattern-Matching Rules;
6.4 Pattern-Matching Examples;
6.5 A Final Look at Pattern Matching;
Chapter 7: Advanced Editing;
7.1 Customizing vi;
7.2 Executing UNIX Commands;
7.3 Saving Commands;
7.4 Using ex Scripts;
7.5 Editing Program Source Code;
Extensions and Clones;
Chapter 8: vi Clones Feature Summary;
8.1 And These Are My Brothers, Darrell, Darrell, and Darrell;
8.2 Multiwindow Editing;
8.3 GUI Interfaces;
8.4 Extended Regular Expressions;
8.5 Enhanced Tags;
8.6 Improved Facilities;
8.7 Programming Assistance;
8.8 Editor Comparison Summary;
8.9 A Look Ahead;
Chapter 9: nvi—New vi;
9.1 Author and History;
9.2 Important Command-Line Arguments;
9.3 Online Help and Other Documentation;
9.4 Initialization;
9.5 Multiwindow Editing;
9.6 GUI Interfaces;
9.7 Extended Regular Expressions;
9.8 Improvements for Editing;
9.9 Programming Assistance;
9.10 Interesting Features;
9.11 Sources and Supported Operating Systems;
Chapter 10: elvis;
10.1 Author and History;
10.2 Important Command-Line Arguments;
10.3 Online Help and Other Documentation;
10.4 Initialization;
10.5 Multiwindow Editing;
10.6 GUI Interfaces;
10.7 Extended Regular Expressions;
10.8 Improved Editing Facilities;
10.9 Programming Assistance;
10.10 Interesting Features;
10.11 elvis Futures;
10.12 Sources and Supported Operating Systems;
Chapter 11: vim—vi Improved;
11.1 Author and History;
11.2 Important Command-Line Arguments;
11.3 Online Help and Other Documentation;
11.4 Initialization;
11.5 Multiwindow Editing;
11.6 GUI Interfaces;
11.7 Extended Regular Expressions;
11.8 Improved Editing Facilities;
11.9 Programming Assistance;
11.10 Interesting Features;
11.11 Sources and Supported Operating Systems;
Chapter 12: vile—vi Like Emacs;
12.1 Authors and History;
12.2 Important Command-Line Arguments;
12.3 Online Help and Other Documentation;
12.4 Initialization;
12.5 Multiwindow Editing;
12.6 GUI Interfaces;
12.7 Extended Regular Expressions;
12.8 Improved Editing Facilities;
12.9 Programming Assistance;
12.10 Interesting Features;
12.11 Sources and Supported Operating Systems;
Appendixes;
Quick Reference;
ex Commands;
Command Syntax;
Alphabetical List of Commands;
Setting Options;
Solaris 2.6 vi Options;
nvi 1.79 Options;
elvis 2.0 Options;
vim 5.1 Options;
vile 8.0 Options;
Problem Checklists;
Problems Opening Files;
Problems Saving Files;
Problems Getting to Visual Mode;
Problems with vi Commands;
Problems with Deletions;
vi and the Internet;
vi Web Sites;
Amaze Your Friends!;
Tastes Great, Less Filling;
vi Quotes;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted September 19, 2000

    Great Vi Reference Book

    This book covers in detail not only basic vi commands (editing, moving from line to line or paragraph to paragraph), but also doing basic and global searches, 'cut and paste,' and detailed search commands. It also devotes a couple chapters to vi's 'companion,' ex and the commands associated with it. There are also a few chapters devoted to the various vi clones available and the five appendixes are devoted to general reference information about vi (tables of various commands, ex commands, troubleshooting vi problems, and finally a section on online vi resources). I've used vi for years and never realized the amount of commands, both in vi and ex available until I started reading this book. In my opinion, vi is one of the best text editors around and this book is a good source of information about it.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)