There is a nice plugin that I found recently that lets me write blog posts in VIM and post them right away. I think it’s rather well done and recommend it (assuming this blog gets posted).
This plugin is called “vimblog,” but it only actually works for Wordpress out of the box. I’m not really going to beat a dead horse with as stick here, though, because the author of the plugin already has installation instructions and some images.
Installation Instructions / Main Page
However, he didn’t really put up usage instructions. It’s easy enough, though, and I found some information in the source code (and cleaned it up a bit):
Usage for deleting a post:
:Blog del id
Usage for saving a draft of a post:
:Blog draft
Usage for Publishing a post:
:Blog publish
Usage for getting the list of Categories:
:Blog cl
Usage for Get Post [id]:
:Blog gp id
Usage for New Post:
:Blog np
Usage for Recent [x] Posts (defaults to last 10):
:Blog rp [x]
Usage is :Blog option [arg]
switches:
- rp [x] => show recent [x] posts
- gp id => get post with identification id
- np => create a new post
- publish => publish an edited/new post
- draft => save edited/new post as draft
- gc => get the list of categories
- del id => delete post with identification
It has some nice features, as you can see:
When working with a blog post, it has information like this:
Post : [54]
Title : Using VIM to Blog (Wordpress)
Date : 04/03/2008 15:10:46 GMT
Link : http://garoth.com/?p=54
Permalink:
Author : 1
Comments : 1
Pings : 1
Categs : Website
Which is actually very nice and handy, I think.
I just started using it, but it seems to have few small flaws:
Another thing I should mention: using this kind of thing with Vim is great especially if you have markdown installed on your website :D. Markdown simplifies post syntax for doing things like lists, etc. It’s meant to be more human-readable, and even people who have never seen it before should be able to understand what it will do.
Anyway, I’m pretty happy with this stuff.
Hi,
thanks for posting about vimblog.
Some points:
- it is fairly easy to move from Wordpress to another blog platform using xmlrpc, well… with some tiny code chages :]
- not being able to add new categories is terrible for me
The thing is: there is no API call to create them via xmlrpc.
- getting back to a draft is very easy. Just “:Blog draft” it. Then “:Blog publish”, them draft again, then…
You can move it from draft to published whenever you want. I always do it until the post is ready.
- syntax highlight is a bit messed yes. I need to instruct Vim to stop using the header highlight in the body of the post. It’s on the TODO list some time.
Thanks for the post