Learning vi (1/2 day -- 4 hours)

Synopsis

This course provides mastery of the vi editor. Both basic and advanced vi skills are covered.

All of the concepts presented in this course are reinforced with numerous hands-on labs and exercises.

Target audience This course is appropriate for UNIX users, managers, system analysts and application developers.
Prerequisites Beginner-level Unix knowledge is required, for logging in, understanding files and directories, etc.
Lab exercises Hands-on exercises reinforce vi skills. Users will create new documents as well as edit existing ones.

Course outline

1. About vi

  • About the vi editor?
  • The Zen of vi
  • vi overview
  • vi commands
  • vi humor

2. Editor Basics

  • Basic navigation
  • Adding and Deleting text
  • Changing text
  • cut, copy, and paste
  • vi mode and ex mode
  • line ranges
  • Search and Replace
  • Saving and exiting

3. Advanced Editing

  • Using bookmarks
  • Regular expressions
  • Subexpressions
  • Working with multiple files
  • Special replacement characters
  • More file commands
  • The secret buffers
  • Some cool moves
  • Moving and copying lines by range
  • Inserting text from programs
  • Filtering text through programs

4. Building a Powerful vi Enviroment

  • Creating and using abbreviations
  • Creating and using macros
  • The :map command
  • vi options
  • Saving settings
  • vi under Windows!
Click here to see downloadable files for this course