philc / vimium

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

[Feature Request] Open links in a new window #4182

Open sohanglal opened 1 year ago

sohanglal commented 1 year ago

Is it possible to add the option to open a link in a new window. Right now, the only way to do this is to open a link in a new tab, navigate to that tab and type shift + w to open in a new tab. If there happens to be better way to do this, please let me know. Also, thanks for making such an awesome plugin!

sohanglal commented 1 year ago

This works well! https://github.com/philc/vimium/issues/4138#issuecomment-1272735979:

In my customized version of Vimium, Vimium C (https://github.com/gdh1995/vimium-c), it's somehow possible: LinkHints supports a parameter of newtab="window", most commands to open URLs support reuse="new-wnd" and there's a trick to make Vomnibar always open URL in new window. So a basic key mapping to do so is:

map f LinkHints.activate newtab="window"
# map xxx LinkHints.activateXXXXXX newtab="window"

map o Vomnibar.activateInNewTab clickLike
mapKey <enter:o> <s-enter>

run <v-nw> $s#reuse="new-wnd" mask
run t nw createTab
run p nw openCopiedUrlInNewTab
# run xxx nw openXXXXX