Kirk's Blog
Java Performance
Services, Training, Seminars, Mentoring

Not Using vi?

posted Wednesday, 5 March 2008

Many years ago someone provided the advice, learn vi, it is the native editor on Unix and you know it will always be there. It seemed like sensible advice so I spent a bit of time learning the 10 or so key stroke combinations one needs to know in order to be productive. I had already used a couple of editors that had some form of input and command mode so that wasn't a difficult concept to adapt to. Some of the command functioned like their Unix shell counter parts, most notably, grep and sed.

Without much thought, vi became my text editor of choice. I tried emacs and though I appreciate it's power and flexibility, my fingers didn't. I just couldn't get them used to ctrl-meta-X-meta-J keystoke combinations intended to so simple things. Sadly I almost completely stopped using it when requirements forced me to work in Windows. I tried a few vi replacements but nothing seemed to work well in Windows until I finally found Vim. But by then I had started using some fancy editors and IDEs with code completion, syntax highlighting and so on and so forth. Seemed like vi would end up on the heap of quaint but now obsolete tools.

Now Linux is really making a strong showing and Mac OS is being shipped on some very sexy hardware and of course my old friend vi comes along for the ride. At first I started using it for just simple editing tasks and as time has passed I've started migrating back to using vi on a more regular basis. This is now to the point that over the last couple of days I've done more editing in vi than my favorite IDE, IntelliJ. And yes, I have been editing code!

Today I started editing an HTML document for my up coming JavaOne lab. One of the guys at Sun made a nice new HTML template that I'm now busily cut an pasting text into. Some of the custom tags are nuts to type in and so I decided to take the most commonly used ones and create macros for them. It really has taken the pain out of editing this document. And that is the point, I'm using vi (and IntelliJ for the same reason) because it is really good at it's core purpose, editing. It keeps my hands away from the mouse which means I'm not thinking about mechanics but only about what I want to get on the page (screen??).

It is beauty in simplicity and this makes vi as relevant today as it was years ago.




1. Rob Diana left...
Wednesday, 5 March 2008 2:44 pm :: http://regulargeek.com/

I use gvim on Windows as well as vim on any linux box. I learned a long time ago that even simple vi skills will be beneficial if you ever work on a unix box. I have told several people before to learn vi as it is probably the only useable editor installed on the unix box. Someday people will learn.


2. Saul left...
Monday, 17 March 2008 10:29 pm :: http://www.soabloke.com

I used vi extensively in the eighties and came back to it recently with Linux. I find that my fingers remember commands better than my conscious brain does. With respect to vi vs emacs I think this is like "imprinting"...whichever editor you use first gets "imprinted" and you can never switch to the other.


3. krzyk left...
Tuesday, 18 March 2008 8:17 pm :: http://www.bighdtvsreview.com

I am sometimes using vim/gvim when I am fed up with eclipse (which is sometimes very slow if using clearcase plugin). Macros, hmm, I didn't learn them yet, maybe they would make me edit more in vim also :)


Course Schedule

Java Performance Training, Oslo Norway, October 8-11


Java Performance Tuning
Chania Crete, October 14-17

Speaking @

JavaZone, September 17-18

JAOO Aarhus, September 28 - Oct 3.

Calendar

««Jul 2008»»
SMTWTFS
   12345
6789101112
13141516171819
20212223242526
2728293031

Performance Anti-Patterns

My Top Tags

                                       

Mailing List

My RSS Feeds