Vim and Vi Tips: Essential Vim and Vi Editor Skills, 3rd ed.

No Unix-class system administrator or user will get far without learning the basics of Vim, the modern replacement for vi. Contrary to some misinformed opinions spread among users who are new to Unix-class systems, Vim is not difficult to learn.

Granted, it is not very friendly to beginners, but once you grasp the basic concepts, you will never have to learn another text editor again, because Vim is available for all standard operating systems, including Microsoft Windows, Mac OS X, Linux, BSD, and many others.

No matter which operating system you are using Vim on, Vim and Vi Tips: Essential Vim and Vi Editor Skills, 3rd ed. helps you shorten the time you need to spend learning Vim.

With over 50,000 copies in distribution to date, Vim and Vi Tips has become the Vim book to go to when you are learning Vim or just trying to remember a specific shortcut.

The latest, 3rd edition teaches you even more about Vim without sacrificing the concise style and the easy to follow presentation of the subject.

Buy Now

What has changed in the third edition?

This is a serious upgrade with no page left unturned. Every section of the book was edited or expanded according to reader feedback. Chapter 5 has been greatly expanded and a new Chapter 6 has been added (it was a separate book before). There are more screenshots now, with even more screenshots!


Buy Now

Table of Contents

Before We Begin

Chapter 1: Essentials

1.1. DO. NOT. PANIC.
1.1.1. Stopping Unwanted Macro Recording
1.1.2. Getting Unstuck
1.2. Cancelling Commands
1.3. Switching Between Command Mode and Insert Mode
1.4. Escaping from the ex Editor Mode
1.5. Escaping from the Visual Mode
1.6. Escaping from Windows
1.7. Unscrambling the Screen
1.8. Post-Crash Recovery

Chapter 2: Basic File Operations

2.1. Starting Vim
2.2. Starting Vim and Opening a File for Editing
2.3. Starting Vim and Opening Multiple Files for Editing
2.3.1. UNIX Filename Wildcards
2.4. Switching Between Files
2.5. Opening a File after Starting Vim
2.6. Saving the Current File
2.7. Forcing Vim to Save the Current File
2.8. Saving the Current File Under a Different Name
2.9. Saving a Part of the Current File
2.10. Saving a Part of the Current File Under a Different Name
2.11. Appending the Current File to Another
2.12. Appending a Part of the Current File to Another
2.13. Saving the Current File and Quitting Vim
2.14. Forcing Vim to Save the Current File and Quit
2.15. Quitting Vim without Saving the Current File
2.16. Forcing Vim to Quit without Saving the Current File
2.17. Recovering the Current File

Chapter 3: Cursor Movement

3.1. Which Line Am I On?
3.2. Which Column Am I In?
3.3. Moving the Cursor One Character/Line at a Time
3.4. Moving the Cursor x Characters or Lines at a Time
3.5. Moving the Cursor to Column x
3.6. Moving the Cursor to the Start or End of Line
3.7. Moving the Cursor Between Lines
3.8. Moving the Cursor to Character x
3.9. Moving the Cursor Between Words
3.10. Moving the Cursor Between Sentences
3.11. Moving the Cursor Between Paragraphs
3.12. Moving the Cursor Between Matching (), {}, [], or <>
3.13. Moving the Cursor Between Markers
3.14. Moving the Cursor Relative to the Vim Screen
3.15. Moving Around with Simple Search
3.16. Repositioning Text Relatively to the Screen

Chapter 4: Editing

4.1. Entering Text
4.2. Entering Special Characters
4.3. Inserting Lines
4.4. Inserting Files
4.5. Inserting Output of a Command
4.6. Processing Text Using External Commands
4.7. Changing Text
4.7.1. Motion Commands
4.8. Replacing Text
4.9. Replacing One or More Characters with Any Number of Characters
4.10. Replacing the Current Line
4.11. Deleting Text
4.11.1. Deleting Characters
4.11.2. Deleting Words
4.11.3. Deleting Text Using Motion Commands
4.11.4. Deleting Lines
4.11.5. Deleting Lines Using Ranges
4.11.6. Deleting Lines Using Regular Expressions
4.12. Using Registers
4.13. Regular Expressions
4.14. Search and Replace
4.14.1. Restricting Replacements Using Ranges
4.14.2. Replacing Text Using Regular Expressions
4.15. Cut, Copy, and Paste
4.15.1. Using the Clipboard
4.16. Copying Text
4.16.1. Copying Characters
4.16.2. Copying Words
4.16.3. Copying Text Using Motion Commands
4.16.4. Copying Lines
4.16.5. Copying Lines Using Ranges
4.16.6. Copying Lines Using Regular Expressions
4.17. Pasting Text
4.18. Joining Lines
4.19. Changing Case
4.20. Incrementing and Decrementing Numbers
4.21. Repeating Actions
4.22. Undo & Redo

Chapter 5: Tricks

5.1. Running Commands
5.2. Sending Vim to the Background
5.3. Shell Access
5.4. Using Buffers
5.5. Using Windows
5.6. Using Tabs
5.7. Using Sessions
5.8. Browsing the Filesystem Inside Vim
5.9. Visual Mode
5.10. Abbreviations
5.11. Syntax Highlighting
5.12. Macros

Chapter 6: Meet Ed

6.1. Why Bother with Ed?
6.2. Starting Ed
6.3. Starting Editing a File with Ed
6.4. Entering the Ed Command Mode
6.5. Append Mode and Insert Mode
6.6. Undoing Changes
6.7. Saving the Current File
6.8. Exiting Ed
6.9. Saving the Current File and Exiting Ed
6.10. Printing Lines
6.11. Moving Around
6.12. Search and Replace
6.13. Copying and Pasting Lines
6.14. Deleting Lines


Buy Now