Blogging from VIM

December 10, 2007 by pedro mota

For Vi, Vim or GVim users, there is a simple way to manage your blog posts. Under Vim environment, you can create new blog posts, edit, list all categories, list older posts, delete posts, turn Published into Draft posts, and vice-versa.

It is out-of-the-box working for Wordpress, but very easilly, you can make it manage Blogger, MovableType, TextPattern, and other platforms.

Its the beauty of Open Source software. Study the code, change it, and use it.

It is very safe to use it because unlike proprietary software, you can check for \“phone_home\” procedures.


Use a ruby enabled Vim. For Debian/Ubuntu, get it by doing a:

sudo apt-get install vim-ruby


  • copy the script to your Vim scripts path, $HOME/.vim directory
  • edit your .vimrc (if not exists, create it: $HOME/.vimrc) and insert: “ if !exists(’*Wordpress_vim’) “ runtime vimblog.vim “ endif
  • open the vimblog.vim script and edit the personal data in def get_personal_data method approx. at line 97
  • @site value, do not insert \“http://\”. Just insert the blog address, like in my case \“
  • @xml value, insert the path to your blog’s xmlrpc.php file. If, like in my case, it is in / from your blog address, do insert \”/xmlrpc.php\“
  • run Vim and try fetching the last 10 posts by doing: :Blog rp

If you can see them, it’s fine. If not, test this: * check if the script is being found, by typing :B + TAB key. Upon code completion, it is ok. Remember, capital B. * if error persist, check for the correct path for xmlrpc.php in @xml value.


Some screenshots at my Flickr account.


Pull it from my Github repository

Download script from

Keep up with newer versions.

update: if you need tags, you can get get it from Fernando repository at github. update: another great forked version from Bryan at github.

© 2018 | Follow on Twitter | pedro mg & Hugo