1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 08:07:59 +01:00

add :sbclose to close the sidebar and :sbar, :sbopen aliases for :sidebar

This commit is contained in:
Doug Kearns
2007-09-18 08:25:29 +00:00
parent 18bc708c9b
commit 8fd3550be0
3 changed files with 22 additions and 3 deletions

View File

@@ -1076,7 +1076,27 @@ function Commands() //{{{
completer: function(filter) { return vimperator.completion.get_options_completions(filter); }
}
));
addDefaultCommand(new Command(["sideb[ar]"],
// TODO: sclose instead?
addDefaultCommand(new Command(["sbcl[ose]"],
function(args)
{
if (args)
{
vimperator.echoerr("E488: Trailing characters");
return;
}
document.getElementById("sidebar-box").hidden = true;;
document.getElementById("sidebar-splitter").hidden = true;;
},
{
short_help: "Close the sidebar",
help: "TODO"
}
));
// TODO: sopen instead? Separate :sidebar from :sbopen and make them behave
// more like :cw, :cope etc
addDefaultCommand(new Command(["sideb[ar]", "sb[ar]", "sbope[n]"],
function(args)
{
if (!args)