プロファイル毎に runtimepath を設定する。

以下のように配置する前提。
変えたい場合は適当にコードをいじるべし。

.vimperator/
    default/
      colors/
      plugin/
    profile2/
      colors/
      plugin/
    profile3/
      colors/
      plugin/
    ...

.vimperatorrc に埋め込むコード

{
  let defaultName = 'default';
  let option = liberator.modules.options.get('runtimepath');
  let root = option.get();
  let homeDir = Cc['@mozilla.org/file/directory_service;1']
                  .getService(Ci.nsIProperties)
                  .get("ProfD", Ci.nsIFile)
                  .path;
  let profileName = homeDir.replace(/.*[\\\/]/, '').replace(/.+?\./, '');
  let runtimepath = root + '/' + profileName;
  if (liberator.modules.io.getFile(runtimepath).exists()) {
    option.set(runtimepath);
  } else {
    option.set(root + '/' + defaultName);
  }
}

coderepos に vimperator-plugins/branches/1.2 が出来たので、書いてみた。

あうば

1.2では runtimepath とかなかったりする?

  • > 1.2対応版書いた