POSTS

Blogging with Vim

Blog

I have been wanting to get the Vim Editor working as a tool for blogging. I’d discussed this a time or two with my friend Daniel Miessler, and he brought up a critical thing that was missing for him in migrating away from Textmate: the ability to do an “I’m feeling lucky” hotlink onto a word as one is composing.

I had to admit, this was a pretty compelling feature provided by Textmate’s “Hyperlink Helper” bundle. Its lack definitely hindered my drive to blog in vim.

To that end, I have created my first Vim plugin and port this sexy capability to Vim.

The port is called GIFL which is not some sort of obscure term for attractive septugenarians, but rather is Google I’m Feeling Lucky.

insanity wolf recommends vimscript

With this installed you can do things like:

Imagine you have the following text, with your cursor at ‘*’:

*lindsay lohan

Now enter:

\gifl2e

You now have:

[lindsay lohan](http://www.myspace.com/lindsaylohan*)

That is, the Markdown code for a URL. That’s pretty handy. This loads up in the global namespace, so you can use it anywhere and everywhere. I’ve found it suprpisingly handy in places other than a blogging context. It’s still very, very, very alpha, but it gets the job done.

ship-it squirrel

I must say that coding in vimscript is a bit of a challenge, but I have been greatly helped by Steve Losh’s Learn Vimscript the Hard Way.

By the way, thanks to Pedro MG’s vimblog project, I was able to write this post in Vim, with GIFL doing nearly all the linking.

I think that both GIFL and Vimblog need to be polished a bit before I can say that, together, they make it as easy as it was in Textmate to be a blogger, but it’s definitely closer. Thanks to Macvim + Janus