Elric's random thoughts in idle times

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

Using vim-addons and PO plugin

leave a comment »

I really like vim-addons. It provides a very convenient and quick way to install, enable, disable, and more, addons for Vim. You can do it per-user if you run without privileges (a link is created under ~/.vim, or system-wide. To work, it needs some data fields in a yaml file for every plugin. The package vim-scripts in Debian provides such file, so I just used that one.

By default, vim-addons searches for plugins under /usr/share/vim/addons, whereas the plugins provided by vim-scripts are located under /usr/share/vim-scripts. This means you can add any plugin under /addons with the knowledge that it won’t interfere with other vim-scripts.

The reason I did this is because I don’t like the PO plugin file provided with vim-scripts. I rather like its fork, which also includes documentation. This is the entry I created for it in /usr/share/vim/registry/vim-scripts.yaml. You can also create a new yaml file and place it under the same directory. I didn’t have to specify the field basedir, as I placed the files under vim/addons.

addon: po-fork
description: "Enhanced PO addon"
disabledby: "let loaded_alternateFile = 1"
files:
- ftplugin/po.vim
- doc/po.txt
---

This done, use vim-addons list to see all addons with a yaml file, and vim-addons install addon to activate it. Use vim-addons help to get an idea of what you can do with this program.

Enjoy!

Advertisements

Written by elric80

December 1, 2010 at 12:30 pm

Posted in debian, l10n, 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: