VI Is Good For Beginners

Vi Keyboard Navigation Aid


I am not saying Vi is easy for beginners, or that Vi is intuitive for beginners. I am not proficient at Vi. In fact, I am one of the beginners I am writing about. However, I have witnessed people using Vi who are proficient. Moving around on the screen, searching/replacing text. Working with multiple files. Most of all, Automation. The most obvious benefits for using Vi are with the experienced/advanced users. I am writing this post to suggest there are benefits for the uninitiated beginner user. Unfortunately, for the users who have gotten their feet wet and started to appreciate the brilliance that is embodied in the Vi editor, you will just have to suffer and struggle through developing your Vi-Fu.

Why VI?

Even though I am not very good at Vi, there are a lot of things I like about it. It is very fast. even on a remote connection, I can use it over a satellite link or slow, problematic adsl link. Vi is almost everywhere. I believe it is on almost every Linux and Unix distribution. I wish it was on more Windows systems, although, if bash can make it in windows, maybe... Vi has a small resource footprint, for both hard drive space and memory. Vi does not need the mouse. One thing I remember from high school typing class is to keep my fingers on the home row. Reaching for the mouse blows that efficiency right out the window. Vi may be the one tool an admin can get working in the case of a dramatic system failure. Vi can be used on systems that need to have files adjusted to use a GUI.

No Downside?

One thing about using Vi is that there is a learning curve. Many of my classmates from university courses and the workplace remark on how unfriendly Vi is to use. I am not arguing here. It can be difficult, and it is definitely not similar to other text editors. It is the general expectation that any text editor should be intuitive and easy to use, in the same light as write, textpad, notepad, and the rest. Many potential users will expect a 10 or 15 minute " learning " to explore all of the features and functions, and to be proficient after that. I view the Vi learning curve the same as I would approach a new CADD program, a new programming language, a new service (like Git) or something that shows up everywhere- like regular expressions. All of them require a certain commitment in time and effort to learn. I would not expect anyone to just "jump in and be productive" for anything specialised or advanced like this.

How am I Learning?

Here is what I'm doing to learn Vi, and what I think would make for a good learning experience, and also improve our typing speed. All of the editing, fancy manipulations, integrations, automations, and transmorgifications will take time to learn, so leave them for the future. I made a sticker that shows me the basic text movements. I know the bottom of the screen shows me if I am in INSERT mode or EDIT mode. I'll try to avoid using the backspace key, but I can already see it is a firmly entrenched bad habit of mine. I can move the cursor around. I know how to change, yank, and put bits of text. I know how to load a file, and how to save a file. That is the essentials to make Vi a useful tool for me.

I need to work on my finger memory to know how to get to escape and $ more reliably without looking at the keyboard. It will not take long though. For all of the other features, like spellchecking, executing commands, automatic tasks, working with multiple file- I can learn those as I go. I'll take them one at a time when I know there is something I *really* want to do. (like wordwrap).

What Am I Trying To Achieve?

The truth is, Vi will make me a better writer because I will concentrate on what I am writing right now. I won't be distracted by what font I want to use, how wide to make the margins, or snakes under the misspelled words. All of that can wait for an editing session and let me focus on my immediate writing task.

I will keep using Vi, painful as it is, to get better. It has not lasted this long without having merits that justify its existence. Fun does not have to be easy. Fun can be challenging, frustrating, difficult, and confounding. Fun usually is a progression of ability- we get better at a thing, and the old tasks become easier, the new tasks become less impossible.

How Do I get Started?

Like I said above, Vi is everywhere in the Unix/Linux world. Vi is an editor option in Jupyter Notebooks. Vim (Vi Improved) is free for windows users. There are books from Pragmatic Publishing and O'Reilly about becoming good at using Vi and Vim. There are many resources on the web as well.

Below is my graphic/sticker that I put on my monitor. I'm no pro, but it was visually appealing to me. I plan to get it put on a coffee cup, but I also want to have some regular expression hints for the back side. Does that make me a nerd?

Vi Keyboard Navigation Aid Vi shortcuts

Like everything, "There is a big difference between reading a book and building a bridge." It all takes time, effort, and practice.


Some shortcuts To Help Make My Stuff Easier

Sure, I'm not spending a lot of time on fluff. I have to acknowledge some things make VIM easier.

:set linebreak is helpful by keeping words together at the end of a line, instead of splitting at exactly the window width.

:w !python3 this has me doing a happy keyboard dance. As you might guess, it saves the file I have been working on and launches it it python 3. When it finishes, it brings me back to vi!

line numbers. :set number or set nonumber to turn it off. note, set numbers(plural) will not work.