Reconsidering Vim

NOTE: This post is not about the editor war — so please don’t try to start one either.

First, some background. Lets just say that I lost my editor virginity to Vim. It was a brief, but violent introduction — the modal editing was too unfamiliar, the learning curve too steep. After dabbling with a few other conventional editors (such as KWrite), I settled upon Emacs (XEmacs actually, but thats another story).

For the next three years, I tweaked my .emacs file, fiddled around with settings and plugins and modes, played games and browsed the web, checked my email and newsgroups, all within the comfortable confines of Emacs. But I was getting wary of the long startup times and (at that time) the inability to use the same interface and features in console mode (such as over SSH) as in GUI mode. It was time to move on.

I rediscovered Vim around 6 years ago. I started with a clean slate. As the saying goes, Emacs is an operating system that also happens to have an editor in it. The relatively more focused feature set of Vim was refreshing in comparison. I loved that I could work in GUI mode, save my session, go back home and resume my session in a terminal over SSH, which the exact same interface and keybindings. I quickly became very productive with Vim, and over the years have honed my plugins, settings and color themes to just how I like them.

But recently, I’ve been thinking about this again, and I might just reconsider Vim. I highly recommend reading these two blog posts to better understand where I’m coming from:

Don’t get me wrong — I think Vim still has a lot to offer. But, I can not deny that Vim is not what I would call a “forward looking editor.” Here’s why:

  • Development community: the Emacs development community is a lot more open and vibrant right now than the Vim community. Part of this has to do with the BDFL model in Vim. Bram Moolenar has done a tremendous job in bringing Vim to the stage where it is. People can and have forked Vim in the past. But for one reason or another, Vim has stayed Vim, and its development trajectory has been slow and incremental.
  • Source code: Vim’s source code is not clean. At all. I just briefly skimmed over the source tree for Emacs 23, and it looks a lot more understandable and well structured.
  • Architecture: Vim 7 finally got spell check. But the spell check does not use any of the existing tools or formats. Vim has its own scripting language, with its own interpreter, grammer and data structures. Why not just use one of the many wonderful programming languages out there? Yes, there are interfaces to allow writing Vim code in Python, Ruby, Perl etc. But why reinvent the wheel all over again?

When Bram Moolenaar — the lead developer of Vim –  joined Google, I had hoped that Vim would generate a lot more interest and enthusiasm. But so far, it hasn’t changed much.

And so, in the next few weeks, I’m going to take another look at Vim as well as Emacs. I’ll try to do an objective evaluation of where the editors stand today, where I perceive they are headed. I hope to make my decision on whether to move away from Vim or not by the end of this year.

Reblog this post [with Zemanta]

Vim and the future of editors

As is evident from the image below, something about my last post clearly struck a chord with a lot of people.

Traffic spike

Traffic spike

I don’t know if it was “vim” or it was “sexy”, but somehow this post landed up on Reddit. This is the closest I’ve come to being slashdotted — for that one day, Reddit drove nearly 95% of the traffic to my site. Also, before you start jumping to conclusions from the graph above, let me put some numbers out there. On average, my site gets anywhere between 200 to 400 visitors daily. On April 18th, my site got 7000+ visitors, an order of magnitude more than I normally get. That is the spike you see, and now the traffic is back to normal, thank you very much.

Since a lot of people seem to be interested in Vim hopefully, I want to discuss the space of text editors (in particular, editors for programming) and where I think we are headed.

The first observation is that both of the giants on the editing world — Vim and Emacs — are ancient by any standards. Depending o how you look at it, I think it is fair to say that neither editor has evolved significantly in terms of the underlying code, architecture and usage model in the past two decades, if not more.

The second observation is that despite the large number of editors out there, IMHO few have any significant mind and market share other than Vim and Emacs. Obviously there is Eclipse, Visual Studio, IntelliJ etc.

And so I wonder, what would the text editor landscape look 5-10 years down the line? There are many who would say if it ain’t broke, don’t fix it. However, I’m a big believer in change, and I think over time, change is inevitable. However, at this point I don’t know what, if any, substantial change is happening in the text-editor arena. No new editors with fundamentally new ways of manipulating text or amazingly compelling features are emerging. I actually don’t mind reinventions of the wheel either, as long as the reinvention delivers a much better wheel. For instance, the Vim source code is not the most modular, extensible or maintainable. And it is in C — not that there is anything wrong with it, but I think an object oriented language is better for a complex piece of software like Vim.

The only recent buzz has been about Textmate and the many clones it has since inspired. I’m really looking forward to Yzis reach a usable milestone. What are other promising editors out there that you are excited about?

Vim is still sexy!

NOTE: This post is not about the editor war — so please don’t try to start one either.

I use vim as my editor of choice. As I note above, to each his own editor.

However, Vim is not what one would call a “sexy editor”. After all, it has been around (in some shape or form) since before I was born. It does not generate as much buzz in the blogosphere and is not the darling of all the new kids on the block, as some of the other editors out there. Not many Ruby on Rails developers, for instance, seem to be using Vim for coding (actually, saying that a lot of RoR developers seem to be using Textmate is probably more accurate, but you get the point). It is written in C and does not use git for hosting. The Vim website leaves much to be desired. In the social networking world, Vim barely has a presence.

Vim attitude

But, I contend that Vim still has a lot to offer. Here are few of the things you can check out to spruce up your Vim usage:

I’m also very happy to see the number of Vim related repositories on github. Bottomline: don’t give up on Vim. Vim is still sexy baby, you just need to look in the right places :)

Update: I’m including a screenshot of Xoria below.

xoria, GUI, C

Web services I wouldn’t mind paying for

Here are some web service I wouldn’t mind paying for, simply because of the value they add to my day-to-day life. Note that some of them already have paid plans, it is just that I haven’t reached a stage where I actually need to upgrade. All I’m saying is that these websites have enough real value add for me to be worth for real money.

mint.com

Having all my financial data pulled in a single place is fantastic. Previously, I used to have to go and log into 5 different websites to check on all my bank accounts and credit cards. Add to that the ability to examine spending trends, watch your investment grow (or crash, as is the case with the current economy) over time, alerts for fee, low balance and over-budgets etc, and you’ve got a killer service in your hands. Of course, Mint is not without its problems, but the benefits far outweigh the snags.

passpack

Passpack has been a real time saver for me. I have written about web based password managers before, and so far Passpack has been just fantastic! I just wish they would bring back search-as-you-type…

RTM

I’m a big believer in using the right tools you help you work smarter. RTM is a great way to offload your todo list from your brain. It has all the key elements of a good web service good — a great UI, keyboard shortcuts, the ability to email tasks, integration with services like IMified, a nice API (so you can use desktop apps such as Gnome DO or Quicksilver to interact with RTM without ever leaving your desktop).

Tools I use: beamer

This is largely a rip-off of my original article. I figured I should repost it for posterity and it fits in line with my tools theme.

Being a grad student (for that matter, in almost any profession these days), I frequently need to give talks or present some material. I have finally settled on Latex Beamer as my preferred presentation tool, and this article describes why.

Introduction

Presentation is one of the most effective means of communication for a small audience with diverse backgrounds. Both in the industry and the acedemia, it is becoming increasingly important to create affective and compelling presentations. Not surprisingly then, the presentation tool you use becomes very important in the work place.

The de facto tool for presentation out there is Microsoft Powerpoint. For more reasons than one, I prefer not to use it. I have tried several alternatives, and finally decided to use Latex Beamer for my presentations. Here I try to describe why I made this choice. I must mention here that the beamer web page looks ostentiously simple and naive — don’t be fooled by it. Beamer is one of the most sophisticated and extensively documented (user manual has more than 300 pages of professionally written documentation) presentation tools I have come across. Take a look at one of the sample slides to get a feel of what beamer can do.

Things I dislike about other presentation tools

While I’m not talking about any one tool in particular, the general flavor is of tools belonging to the Powerpoint family (this includes OpenOffice.org’s Impress, KOffice‘s KPresenter etc)

  • I have to worry about layout
  • Font sizes are a function of amount of content
  • Changing parts of a “theme” is hard
  • Powerpoint slides won’t run nicely on Impress or KOffice. The latter two won’t run at all on Powerpoint. Why do I need something as bulky as powerpoint just to do the presentation? While making, I can understand that we might need significant software complexity, but can’t we have something more lightweight for presenting?

Things I like about beamer?

  • Its LaTeX: latex and friends have survived the test of time and for more than 2 decades people have been using tex derived technologies for typesetting their writings. With latex, beamer makes it easier than ever to put mathematical formualae and all kinds of symbols in your presentations, embed images, make tables and do everything else that you can do with latex. Since many of us already use latex, it means there is less tool to learn — I can make my presentations in a language that I’m already familiar with! And I don’t need any bulky tool to manipulate my presentation, just a text editor is enough, thank you.
  • Its PDF: We all know what PDF stands for — Portable Document Format. Thats it! Portable! Latex runs on all major operating systems and architectures out there. Once you get a PDF from Latex, you can display it using any regular PDF viewer. Imagine how easy it now becomes to move your presentation around. You don’t have to worry if your laptop breaks down and the other laptops in the room don’t have the right version of Powerpoint installed. Put your PDF in a USB key and stop worrying about it!
  • Takes care of layout
  • Themes are endlessly customizable: beamer comes with dozens of pre-packages themes, and its very easy to modify an existing theme. Same thing with fonts and colors (you can even do alpha transparency!)
  • Notes and handouts made the way you want them
  • Organize your presentation in a logical manner: beamer sort of follows the MVC philosophy. In each presentation, there is a content structure, which determines how your content flows through (just like a regular article with sections and subsections). Then there is a slide structure, which determines how this content fits onto your slides. The content structure controls the generation of navitation and table of contents. The slide structure controls the slides and the control flow between them.
  • Amazing documentation: The beamer user manual is over 200 pages long, and its all good solid documentation. It is amazing well written considering the fact that its mostly done by a single person. It starts off with a nice tutorial, followed by detailed references and examples.
  • Accompanying packages: Just check out the documentations for xcolor and pgf. The documentation is just as comprehensive as beamer itself, and these packages make it easy and fun to do fancy stuff with beamer. Like draw pretty pictures and do some basic animation. Again, all with the comfort of latex.

But nothing is perfect

  • No knowledge of projectors or screens — the user has to deal with that (or the operating system)
  • Animation is still hard.
  • In general, multimedia is hard: embedding audio and video clips may not work reliably on all platforms.

I highly recommend beamer to anyone who wants to try an alternative to Powerpoint, and if you write a lot of technical papers in latex, you’ll immediately love beamer. Check out my NSDI talk for a sample of what beamer can do for you.