Skip to content

Instantly share code, notes, and snippets.

@Sunitha
Last active December 23, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sunitha/6577089 to your computer and use it in GitHub Desktop.
Save Sunitha/6577089 to your computer and use it in GitHub Desktop.
configuration to add command to open a url in a background tab on vimperator vimperatorでバックグラウンドタブでurlを開くコマンドを追加
javascript <<EOM
commands.add(["backgroundtabopen", "bt[open]", "btabnew"],
"Open one or more URLs in a new background tab",
function (args) {
let index = tabs.getTab();
let special = args.bang;
args = args.string;
if (options.get("activate").has("all", "tabopen"))
special = !special;
let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB;
if (args)
liberator.open(args, { where: where });
else
liberator.open("", { where: where });
tabs.selectAlternateTab();
}, {
bang: true,
completer: function (context) completion.url(context),
literal: 0,
privateData: true
}
);
EOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment