Learning the vi and Vim Editors

There are precisely 3 books available today about the Vim (not vi) editor: Vi Improved by Steve Oualline, Hacking Vim by Kim Schulz and this book, Learning the vi and Vim Editors. The former two deal completely with Vim and I had come away not much impressed with them. I had kept away from this book by O’Reilly since it primarily dealt with vi, which I had no interest in. I was finally motivated to try this book after Steve Losh recommended it in his post Coming Home to Vim.

Learning the vi and Vim Editors is the 7th edition of a long running series from O’Reilly. Earlier editions dealt primarily with vi, and in recent years had expanded to cover the vi clones like Vim. The concept of modal editing, the ex line editor and its commands, the vi visual interface to ex and its modes are all covered very nicely. After years of blindly using vi and Vim, this history and anatomy lesson finally gave me insight necessary to understand why and how they work like they do. This basic foundation of ex and vi is crucial, since once that is solid, one cannot but fall in love with this editor.

The book is not meant to be a comprehensive compendium of vi commands, it only introduces the most common and useful of them. Vim gets a hefty chunk of the book devoted to it covering Vim commands, windows, GVim, tabs, splitting, and VimScript. But, I was left feeling hungry even after this, since Vim has many more features! (I guess I will have to go back to the other two Vim books for more.) The book also covers other vi clones like nvi, viles and elvis. I felt this was a waste of paper, since I am yet to run into folks who use these clones! I hope that the book will deal purely with vi and Vim in its next edition. The last part of the book are Appendices that list the commands and their explanations. This again seemed a waste since Vim has awesome :help documentation.

I am happy to report that this book was not only interesting to read, but helped me get back to Vim. It feels great to work with an editor which can be completely customized to fit one’s needs. This is an introductory book, highly recommended for folks who want to learn about vi and Vim. I hope you stick through the chapters on ex and vi, since that knowledge sets the groundwork to understand Vim better. Among the 3 Vim books, this one clearly stands out as the best introduction to both vi and Vim.

“To me, vi is Zen.
To use vi is to practice zen.
Every command is a koan.
Profound to the user,
unintelligible to the uninitiated.
You discover truth every time you use it.”
— Satish Reddy

Advertisements

2 thoughts on “Learning the vi and Vim Editors

  1. I can’t remember ever being comfortable with any (code) editor other than vim once I got introduced to it. I haven’t ever read through a whole book on it before though. Will pick this up if I have time.

    • Anshul: Vim is my primary editor too. I was force-fed vi in undergrad. Being forced to use only hjkl and a few ex commands, without really knowing why, left a bad taste in my mouth. Later, I started using GVim on Windows and it was really comfortable. However, there was always this nagging feeling of not really knowing the underpinnings of this editor well. This book certainly fixed that problem for me πŸ™‚

      I am pretty sure this book will be a quick easy read and you will come away knowing a few more handy tricks. πŸ˜‰

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: