Elric's random thoughts in idle times

"Why stop now, when I'm just starting to hate it?" – Marvin the robot

Vimpress. Blogging in WordPress with Vim.

leave a comment »

I really like the fact that Vim can do nearly anything, with the appropiate script. Since Vim is a light app, it’s great that you can read your RSS feeds, play music and many more things with it.
Right now, I’m starting to enjoy Vimpress. No need to go to WordPress, edit new post, and pray that nothing goes wrong, and that you don’t lose what you wrote so far (which has happened to me, and I have posted less than 10 times, so far). Plus, the plugin supports tags and categories. You won’t have the html editing facilities WordPress provides you, but this script is powerful enough to do the majority of your tasks.
Perhaps my favorite feature is that you can obtain a list of your previous posts, recall them and re-edit them.

Looking around for more information, I found out there are 3 (+1) versions of Vimpress:

* 1. Original Vimpress
This one has the normal commands. It says you can Save your post, however, I don’t know where it does it.

Commands
* “:BlogList”
Lists all articles in the blog
* “:BlogNew”
Opens page to write new article
* “:BlogOpen id”
Opens the article for edition
* “:BlogSend”
Saves the article to the blog

* 2. hanks’ Vimpress+patch
The second one is a fork of the previous one, the difference is that it will encrypt your password, and :BlogList accepts the number of posts to be listed thanks to a patch (whatever “Slug” is). It also encrypts your password.

* 3. pigeond’s Vimpress
This one adds one very nice feature to the original. It adds the command :BlogSave, which stores your edited post as a draft in the WordPress website. This is the one I was using.

* 4 My Vimpress dumb modification
Yes, there is a fourth possiblity that combines them all. I found out that option number 3 ended up providing a poor :BlogList performance, showing only a few entries. However, I can’t live now without the :BlogSave command it provides. On the other hand, option number 2 adds the :BlogList [n] feature, which solves the problem I had with 3. What did I do? Manually apply the patch on 3, since the patch is meant to be used against the original plugin. Afterwards, I diffed against 2,gaining encrypted password capability. The final result is available at GitHub. So far, this modification of vimpress is the one that works the best for me. I should add that, unlike the other, mine has no personal code (I don’t know ANYTHING about programming). All I did was diff+copy/paste. Thanks to the other 3 lads and the one who provided the patch!

Summing up, the 4th one adds :BlogList [n] (patch) to pidgeon’s vimpress (3), which adds :BlogSave by itself, plus the encrypted password capability from hank’s vimpress (2). Follow the instructions in blog.vim to generate your password.

Give it a try, you’ll really like it. I did this post (and re-edited old ones) with vimpress, and I’m never going back to the Dashboard (but for inserting pics, Vim can’t do ALL).

Happy Vimming!

Advertisements

Written by elric80

October 27, 2009 at 4:44 am

Posted in linux, vim

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: