This script for vim provides some commands to list, edit and publish articles on a wordpress blog.


  • vim-python


Get package from the Files tab and uncompress it in your ~/.vim directory. Then create or edit the ~/.vim/passwods.vim file:

let blogit_username='Your blog user name'
let blogit_password='Your blog password. Not the API-key.'
let blogit_url=''

In addition you can set these settings in your vimrc:

let blogit_unformat='pandoc --from=html --to=rst --reference-links'
let blogit_format='pandoc --from=rst --to=html --no-wrap'

The blogit_format and blogit_unformat each contain a shell command to filter the blog entry text (no meta data) before a commit and after an edit, respectively. In the example we use pandoc to edit the blog in reStructuredText.

If you have multible blogs replace blogit in blogit_username etc. by a name of your choice (e.g. your_blog_name) and use:

let blog_name='your_blog_name'


let b:blog_name='your_blog_name'

to switch which is used by default. If a blog post/comment/list is open in the current buffer that is used instead. To explicitly select which blog should be used with the commands ls, new, this and edit add your_blog_name as and aditional argument, e.g.:

Blogit edit 42 your_blog_name

blogit comes with a vim-help-file (doc/blogit.txt). See ":help add-local-help" (from vim) for an howto install it.

Development version

Checkout the git repository with this command:

git clone

How to use it

Just fill in the blanks, do not modify the highlighted parts and everything
should be ok.

gf or <enter> in the ":Blogit ls" buffer edits the blog post in the
current line.

Categories and tags can be omni completed via compl-function (usually
CTRL-X_CTRL-U) once the list of them is gotten via ":Blogit cat[egories]"
and “:Blogit tags”.


  • Blogit ls [blog_name]
    Lists all articles in the blog
  • Blogit new [blog_name]
    Opens page to write new article
  • Blogit this [blog_name]
    Create a blog post from current buffer
  • Blogit edit <id> [blog_name]
    Opens the article <id> for edition
  • Blogit page <id> [blog_name]
    Edit a page
  • Blogit commit
    Saves the article to the blog
  • Blogit push
    Publish article
  • Blogit unpush
    Unpublish article
  • Blogit rm <id>
    Remove an article
  • Blogit tags
    Show tags list
  • Blogit preview
    Preview current post locally
  • Blogit help
    Display help

Articles format

From: Romain
Post-Id: 531
Subject: blogit.vim
Status: publish – 7 Comments (spam spam)
Categories: Internet, Programmation
Tags: python, vim, wordpress
Date: Sat 20 Jun 2009 02:44:34 PM CEST

Here is my article…

Also available in: HTML TXT