philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.2k stars 2.48k forks source link

automatically open vomnibar when using the extension: NewTab adapter #3554

Open cyberhuman opened 4 years ago

cyberhuman commented 4 years ago

Is it possible to open vomnibar in a newly opened tab when Ctrl+T is pressed?

gdh1995 commented 4 years ago

The PR #3540 may help (it's not merged into Vimium yet). With it you can write a small HTML file to open Vomnibar on page loaded, and configure NewTab Adapter to use the file.

cyberhuman commented 4 years ago

Oh, that would be nice! Thank you!

philc commented 4 years ago

This is the new tab adapter that's being referenced in this issue.

Here's the workflow that I've used for getting Vimium on the new tab page. Help me compare and contrast this to using NewTab adapter + PR #3540 (which I have related concerns about).

I use an extension similar to NewTab adapter (it's not on the chrome store, but I could publish it if others want to use it) that forwards the new tab page to a file:// URL on my computer. I have a file which is a blank, dark HTML page. Since it's a file:/// URL, Vimium can run on this page. When the page is opened, I hit "O" to the open the vomnibar, or "b" for bookmarks, etc. It's not "automatic" as this issue is requesting, but it's unsurprising and fast.

As an aside, I have a long-standing TODO to document the recommended way to get Vimium working on new tab pages, because many people ask about it.

cyberhuman commented 4 years ago

@philc thank you for looking into this! I know I can hit "o", "b" etc on the new page; that's what I'm doing right now. But it's a bit weird to be greeted with an empty page if I accidentally hit "Ctrl+t" instead of just "t". That's why the issue.

indigoviolet commented 4 years ago

Do you have a suggestion for how to open the vomnibar (in Firefox) from a new tab - initial cursor focus is in the address bar, so it requires another keystroke (F6) to move focus to the page.

gdh1995 commented 4 years ago

@indigoviolet NewTab Adapter has an option of Focus web page when creating a new tab, and it should also work on Firefox.

indigoviolet commented 4 years ago

@indigoviolet NewTab Adapter has an option of Focus web page when creating a new tab, and it should also work on Firefox.

That's pretty great, thank you!