Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Vi(1) Tips,: Essential Vi/Vim Editor Skills Paperback – October 18, 2008
See the Best Books of 2017
Looking for something great to read? Browse our editors' picks for the best books of the year in fiction, nonfiction, mysteries, children's books, and much more.
About the Author
Jacek Artymiak has written over 100 articles and over 20 books on Drupal, Google Docs, Linux, OpenBSD, OpenOffice.org. His books on OpenBSD have sold in over 25,000 copies worldwide.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
While vi is reviled by many for being difficult to learn, this book shows that vi is easier to learn than it would initially appear, especially as it does not use old, confusing terminology.
The first chapter of the book, appropriately enough for the vi editor, deals with how to get out of those panic situations you find yourself in when you first start using vi. It is not until the second chapter that we actually see how to start vi from the command line.
This may sound backwards, but in my experience it is very close to the usual method of learning vi: I need an editor. What is vi? Let me run it on my dissertation file and see. Ahhh! How do I get out of it?
At this point, most people run screaming from the room and never try vi again. This is unfortunate because vi is extremely useful and works well with Unix and with other operating systems. If you wanted one editor you could use on every server and operating system you use in your daily work, vi (and vim) would be one of a very few you could count on to be there or be available to install.
Had I known, when I started with vi, that there was a way to abandon changes and a way to recover my original file (that I had not yet saved), I would have been a lot less apprehensive when using the editor. It is very good to remember how to deal with those panic situations first, and this book emphasizes this.
The bulk of the book, as you would expect, is given to File Operations, Cursor Movement, and Editing. The book combines a short paragraph explanation of a task, such as replacing a line, with overlapping screen shots to show before, during, and after views of the editing operation, followed by a numbered, step-by-step command list that does the operation with vi/vim.
The use of illustrations is very helpful because it is not always clear what will happen on the screen when you type vi commands. This is much less confusing than learning by guessing what commands may do and seeing what happens when you use them.
The book also covers intermediate usage of vi, such as using registers and regular expressions, so is useful for more than just getting started. Even so, this book is not intended to show every possible way to use vi since it is focused on getting the user started quickly and building a useful level of productivity.
The book concludes with a small chapter of Tricks such as running external commands, getting command line shell access while in vi, and using job control to "background" vi. There is a short index, as well.
If you want to get up to speed quickly on vi/vim, this is an excellent guide to doing so. There are plenty of intermediate topics to make the book more useful beyond the first few days of vi usage.
I have one minor point that might help vi users. On p 13 Jacek discusses Switching Between Files. This vi feature is helpful when a user opens several files for editing. Users can easily move forward through a list of files using the :n command. However, the Ctrl+^ command only returns to the last file viewed. If you have three files open, for example, and you move from 1 to 2 to 3, you won't be able to return to file 1 by using Ctrl+^. However, you can invoke the :e filename command, e.g., ,:e 1, to return to file 1. I couldn't find a way to cycle back through a list of files, as you could go forward with :n. I'd like to see a future printing make this situation clear.
Anyone who uses Unix should understand vi, so I recommend this book as a resource for those who like to learn by reading a printed book and following exercises supported by example files.
You can learn a lot more by browsing tips at [...], and a little patience.