Emacs as my <Leader> evil-mode
2013-10-16

Hey guys, I just wanted to post a quick demo video on evil-mode. The video is targetted at intermediate/advanced Vim users, so if you’re just starting out you might miss some things. But…hopefully it’ll be an enjoyable watch regardless! Let me know what you guys think of it!
Vim in Emacs Bootstrap
2013-09-09

Did I wake up on the wrong side of the bed?

My New Year’s resolution for 2013 was to learn Vim. I was so new to Vim that I did not even know how to join lines properly. However, I was diligent, patient, and stubborn enough to stick at it. It didn’t take long for me to fall in love. I even ended up writing a plugin for Vim that got so popular that I was writing VimL as a second job.

Sounds like I’m pretty happy with Vim (and I am), so why am I trying Emacs?

Curiosity is a major reason. But more I think the philosophy of Emacs fits my personality better. The Vim community is very much divided into two camps: the text editor people, and the people who try to turn Vim into an IDE. I am in the latter. My vim distribution has over 90 plugins. While I haven’t yet run into Vim’s limitations of trying to use it this way, I can already see the walls coming up…

But here’s the thing, I’m addicted to modal editing, not Vim. Read on...

Modularizing VimScript
2013-08-16

The prerequisites

First off, there are two very good resources that are required reading in addition to what’s provided in the official documentation. Steve Losh’s Learn Vim the Hard Way is an excellent book and I highly recommend it. The IBM Series by Dr. Damian Conway is another great resource. Without these I would not have been able to do what I have achieved, so thanks to them!

Where I started

When I first wrote vim-bufferline and vim-airline I was very much a newbie Vim scripter and I tried to follow as many existing patterns as possible. It was evident that the community at large had a very “C-like” mentality, in that most things were done with functions declared in the global scope (I don’t know if this still holds true for modern C development, but as an expression I think people will get what I’m saying). Many of the older scripts (pre GitHub) tended to be large, single file plugins which lived under the plugin folder. For example, EasyGrep is a 3000+ line plugin that helps you search and replace in Vim.

Read on...
1000 stars in 1 month
2013-07-30

1000 stars in 1 month One month ago I pushed the first commit of my plugin vim-airline. Two weeks later I wrote a blog post about the experience. By that time the plugin gained over 700 stars. Two more weeks later, today the project has over 1000 stars. Here are some other numbers: 35 merged pull requests 8 contributed airline themes 4 contributed ctrlp themes 23 total contributors 15 plugins integrated Wow! Read on...
Smart tab expansions in Vim with expression mappings
2013-07-21

I’ve been having a small itch for a while now, and it’s a very simple thing – I want to make my tab smarter. This all starts with a dive into Emmet. To understand what it is, here’s a quick introduction. First, you type something using its syntax:

div>li*4

and after you “expand” it, usually with a hotkey, and it gets converted to

<div>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</div>

As you can imagine, this saves you a lot of typing and lets you prototype a web page (or CSS) in no time once you learn the syntax. It is snippets on steriods! The Sublime plugin handles this perfectly. It maps <tab> as the expansion key. Hitting tab after typing div>li*4 will expand it and put the cursor at the first <li>|</li>. Then after you type something, if you hit <tab> again, it will jump to the next li. It is smart enough to know whether to expand or jump to the next tag.

So how does this functionality look like in Vim? Read on...