Rands recently wrote an entry titled "Editor Religion" firing up the age-old question of what to use to edit text.
I'm a Vim man. In fact I'm using it right now to write this entry with a spellcheck script to highlight any words that I've spelt wrong as I type. Eventually I want to create my own script to upload an entry instead of having to copy it paste it.
Rands' 6th paragraph is something that stuck out to me, it says "...I am a geek and geeks evolve because if they don't they become a joke." I've run into geeks in my own comings and goings who fall into this category, guys who have stuck with the technology that they know and cannot move past it. Skill sets are especially a problem with tech jobs; if you can't keep up with the trends, you eventually can't get a job.
Rand's didn't seem to like vi because of this reason. After all vi was one of the first text editors that actually used the whole screen. In computer terms it's ancient; Bill Joy created it in '76 while he was a graduate student at Berkeley.
This gets me thinking, am I myself not evolving? Am I sticking with a vi clone because that is the way I was taught to code back in my college years? Are there better ways to do it that I refuse to look at?
At work I was occasionally the butt of a jest about living in the stone ages of computers. After using JBuilder for quite a while, most people had switched over to using Eclipse, and open source IDE written in Java that worked fantastically well for Java programming. I myself was quite envious at all the new features that Eclipse offered. It seems like they added in everything I felt that was missing from JBuilder and removed quite a few things that I didn't like. The debugger was second to none.
So why didn't I switch? Why didn't I just use this fantastic IDE?
The fact of the matter is I write and edit code in Vim considerably faster then any normal IDE or text editor.
Vim/vi is not your typical editor by any means. First and foremost, you can't just sit down in front of vi and start typing a letter to your grandma. Vi has three modes: command, insert and last line.
Command mode is what you start in. Here's where the learning curve shines. Every single key on the keyboard does something different. For example, if I want to move the cursor down one line, I press j. If I want to delete the character the cursor is hovering over, I press x. Case is important too, if I press J, the next line will be joined to the end of the current line. The commands get even more detailed then that. Just take a look.
Insert mode is when you actually enter text. There are many commands that will change from command mode to insert mode, for instance i, which will begin inserting at the cursor's current position. The escape key switches back to command mode.
The last line mode is entered by the : command. It's somewhat analogous to the Quake console; used for entering long commands or setting values. A command example might be substituting text for regular expression matches in the entire file.
That's just the beginning. Every single command can be repeated with a keystroke, even inserts. A command can specified to repeat a given number of times. A series of commands can be captured an replayed with a keystroke.
It's about as esoteric as anything can possibly get, I know. Why go to all the pain and trouble of learning all of these crazy commands in the age of mice and pull-down menus?
Speed. Mice are slow. The more I can keep my hands working away on the keyboard the happier I am. The slower the interface is between my thought and the computer's action the more frustrated I get. If I can run commands on the text as fast as I can type the text we're talking some serious speed here.
Vim/vi is, at least where I'm sitting, the closest you can get to a direct brain to computer link for editing text. Plus you don't have to muck about with brain drills and messy neuron interfaces which can always be a bit tricky.
As for old technology, I don't believe I'm hurting my chances of becoming obsolete. In fact, any increase in efficiency I can keep is going to benefit me in my work if anything. Who cares if I'm using an editor who's roots are almost 30 years old if I'm fast while I do it? Anything that has been around (and improved) over the last three decades to where it's become a staple of the geek community has to have something going for it.
In the end it's a personal choice. Vim/vi is by no means for everyone. I am also in no way presuming that it is The One True Way, it just works great for me. I was forced to learn it in college during my first computer science course and it's one of the best things I've learned for pure productivity.
Personal choice being what it is, I have met programmers who write all of their code in Textpad. Mind-boggling.
FeedTicker
Gee!