5digits / dactyl

Pentadactyl and other related Gecko extensions
Other
469 stars 98 forks source link

Request: switch to tab #52

Open AeliusSaionji opened 9 years ago

AeliusSaionji commented 9 years ago

The only advantage firefox's native interface has over pentadactyl's command line bar is the ability to list open tabs as a search result, which, when selected, activate the existing tab instead of opening a new one. Let's kill that last advantage!

osleg commented 9 years ago

pressing b will open a list of buffers where you can start typing and have the list narrowed down by what you type....

AeliusSaionji commented 9 years ago

The functionality of which does not entirely overlap what I proposed. It's not programmed into Firefox's bar for nothing.

azuwis commented 9 years ago

Add this to ~/.pentadactylrc

js <<EOF
overlay.overlayObject(dactyl, {
    open: function open(urls, params, force) {
        if (typeof urls === "string") {
            let matches = urls.match(/^(\d+): /);
            if (matches) {
                tabs.switchTo(urls, true);
                return;
            }
        }
        open.superapply(this, arguments);
    }
});
completion.addUrlCompleter("buffer", "Open Tabs", completion.buffer);
options["complete"].splice(0, 0, "buffer");
EOF
AeliusSaionji commented 9 years ago

Perfect, thanks!

AeliusSaionji commented 9 years ago

So how do we proceed: close the request and hope future pentadactyl changes don't break this? Or, keep it open until this feature is merged into pentadactyl itself, where it has some chance of being fixed as pentadactyl grows?

l29ah commented 7 years ago

Bump! Vimperator already does this.

l29ah commented 7 years ago

The snippet doesn't seem to work in palemoon at least.