Choosing a Text Editor

posted @ Tuesday, April 10, 2007 9:08 PM

 

By and large I live in Visual Studio day in and day out. I picked up a copy of the Pragmatic Programmer back in 2000 and I continue to re-read it every so often, it’s a treasure trove of great information, I highly recommend it if you haven’t read through it before. One of the points Dave Thomas and Andy Hunt make in the book is to pick a text editor and know it well. The goal here is being proficient and learning the keyboard binding that your text editor provides can further improve your daily efficiency. Think how often any given day you are reading through code in one form or another. Notepad is not an acceptable option here, period.

Jeremy Miller and Jean-Paul Boodhoo have discussed switching from mouse driven work to the keyboard in attempt to gain efficiencies. Using the mouse simply slows you up.

Over the years I have looked at a lot of different editors, trying to weigh out their various features they provide, for a long time I was a fan of SciTe. However, time and time again I keep finding my way back to Vim (Vi Improved). Vim and the GVim (graphical) counterpart provide a tremendous amount of keyboard bindings; in fact, there is even a separate command mode for specific keyboard shortcuts (a lot of keyboard shortcuts too!). By keeping my hands on the keyboard I’m not wasting short cycles of time moving back and forth from the keyboard and mouse every so often. I remember using Vi back in college, and I never got comfortable with Emacs – entirely a personal preference although this has been a heated debate for several decades. I said earlier that Notepad is not an acceptable tool, as an example Vim and GVim will provide a type of intellisense through a simple <Ctrl> N keystroke. In fact, Bram Moolenaar, the author behind Vim has created a video titled 7 Habits For Effective Text Editing 2.0.

So now I can edit various files with this powerful text editor, but of course what about my IDE, which is what I said I spend most of my time in throughout the day. What about my email, the time I spend in Word, or SQL Server, this of course is normally where a breakdown occurs, in a sense. We tend to learn new keyboard bindings to do different things in different applications. Enter NGEDIT Software; they have produced Vim emulation within Visual Studio, Outlook, Word, and SQL Server Management Studio. Now my keyboard binding can be the same across the majority of applications I am in! If you have a Gmail account, you will note that Google provides the standard keyboard navigation through the use of the j and k keystrokes, which is rooted in Vim. Vim uses the / key to begin a search within an open document, Firefox supports this as well. The more consistent I keep my keyboard environment across the applications I use the faster I am. What editor do you use? Here is a nice Vim cheat sheet if you're looking for a new text editor to try.