Hacker News new | ask | show | jobs
by susam 2396 days ago
In the graphical browser category, I have tried Qutebrowser and it is neat. However, Firefox remains as my primary web browser. I use the Vimium plugin with Firefox. It provides Vim-like key bindings for many commonly used browsing tasks.

My most favourite commands in Vimum are 'f' and 'F'. The 'f' or 'F' command creates key combinations for all the links found in the page. It highlights the key combinations in little yellow boxes above every link. We can then type the lowercase key combination for a link to open that link. While 'f' opens the link in the current tab, 'F' opens it in a new tab. Alternatively, we can type uppercase key combinations to reverse the behaviour of 'f' and 'F', i.e., 'f' with upper case key combination opens the link in a new tab and 'F' with upper case key combination opens it in the current tab.

My other favourite commands, in no particular order, are: 'J' (go one tab left), 'K' (go one tab right), 'H' (go back in history), 'L' (go forward in history), 't' (create new tab), 'T' (search through open tabs), 'x' (close tab), and 'r' (reload page).

Also, there are the 'h', 'j', 'k', and 'l' commands to scroll left, down, up, and right, respectively.

Vimium for Firefox: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/

Vimium for Chrome: https://chrome.google.com/webstore/detail/vimium/dbepggeogba...

8 comments

To add onto your excellent comment: Another lifesaver for me is the 'gi' command, which focuses your cursor on the first text input. Saves a lot of mouse movements.

For me personally the browser was the last application in which I had to use the mouse, vimium solved that. Sounds like a mundane application but after a serious hand injury it made the difference to me for working 4 hours with mouse and being in pain, or working 8 hours pain free.

With correct tab indices, pressing the tab key should do this, AFAIK.
Just tried 'gi' with Firefox Vimium, seems like it will not set focus to inputs not currently in viewport.
Same here - I used qutebrowser exclusively for a couple months, but in the end I couldn't handle all the annoying popups and autoplaying videos in modern websites - all things that you can block with a single plugin in Firefox, together with ads. Too bad, because Vim plugins never allow full UI control in Firefox(e.g. closing an empty "new tab" is impossible with Vim plugins).

Recently I switched from Vimium to Surfingkeys, which is comparable but also offers an actual Vim emulator for text field input. Can definitely recommend it.

>closing an empty "new tab" is impossible with Vim plugins

Well, strictly speaking Tridactyl can do this. They overwrite your empty tab with their own so Tridactyl works there too and you can 'd' the tab.

>closing an empty "new tab" is impossible with Vim plugins

ctrl+w (is default browser shortcut)

Oh well, I guess sometimes reading the manual is a good idea. Thanks for the tip.
SurfingKeys is my top 5 most useful pieces of software. I’ve heavily customized it to make my web browsing as efficient as possible for my workflow.

Check out my configuration to get some ideas of what you can do: https://github.com/b0o/surfingkeys-conf

Note that while I currently use Firefox, I haven’t yet added instructions on how to install my config there, which is different to Chrome due to lack of file system access permissions. Long story short, use the `gulp serve` task to start a server on `localhost:9919`, then point the SurfingKeys configurator there.

Try Vivaldi (chromium based browser with a LOT of settings). I had the same problem until I downloaded it, you can natively bind a key to close current tab, it will work on new tabs (and files)
I have tried Vivaldi multiple times, the last time it still had noticeable input delay and slow performance...but support for Philips Hue lights.

Not quite what I'm looking for. I've tried so many browsers and in the end I've always come back to Firefox.

Well if you ever get the urge to try again, try disabling hardware acceleration. It fixed that problem for me.
I get around this with qutebrowser by whitelisting JavaScript.
How do you do that on a per-domain basis?

I suppose looking at javascript sources and whitelisting by domain isn't impossible with the UI tools available in Qute but I don't think anything like that currently exists (I've looked around a little).

Still a real ad-blocker would be great, youtube is barely usable these days with three layers of unskippable ads on each video. (although you can work around that /specific/ problem with umpv and a hotkey to launch it: section10 https://qutebrowser.org/FAQ.html )

For everyone who likes vimium, give surfingkeys a try:

https://github.com/brookhong/Surfingkeys (available for both Firefox and Chrome).

The defaults are a bit different, but it's quite similar, and much more powerful. Almost like vimperator/pentadactyl were, before WebExtensions.

I tried Surfing Keys way back when I had to give up Vimperator, found it insanely laggy (like, 5 seconds just to open the command prompt; no idea if it's been fixed). I've used Vim Vixen since then [0], which has almost the same defaults as Vimperator did, for the things it supports.

[0] https://github.com/ueokande/vim-vixen

Ever since I started using vimium, it's become a need for me. It's the reason I don't use safari despite its better performance on a macbook.

Weirdly enough, none of the people I've tried to convince to use it has stuck with it - all very tech literate people.

> It's the reason I don't use safari despite its better performance on a MacBook.

I've been working on a Safari Vim-inspired Extension for macOS 10.15+ for many months now. It'll be paid, something like $5 or less. I would have liked to open source it, but I don't have a way to get enough eyes on a KickStarter or something to gather donations.

It is close to ready, I'm hoping to release it this month. I'll do a Show HN when I do. Here are some screenshots if you'd like to take a look. I'd love some feedback!

Preferences UI: https://i.imgur.com/r8WOrHb.png

Follow Link UI: https://i.imgur.com/RpGxdh6.png

Help Menu UI (needs some work!): https://i.imgur.com/OmMe9LK.png

I'm not telling you how to monetise your project, but here's a thought I've had in the past regarding a hybrid of these schemes: simply make a written commitment to open source the project after X amount of purchases.
I was thinking about this too. I just want to recoup some of my time investment. My only concern is that it'll make some people not buy in hopes that they can wait for others to pay - but I suppose those people would probably just use Chrome/Firefox with free plugins anyway.

Thanks, I'll think more about this. I think it'd also give people confidence in the security of the code - running browser extensions is a little scary since they technically have access to everything. As a customer, knowing that it'd be open sourced would give me some peace of mind that it's not doing anything malicious.

A different consideration is people's motivation to pay, and longevity is one aspect of that - buyer's confidence.

I paid money for an extension that promptly became unsupported and then died in an upgrade. Which is fine, whatever, but it did put a big question mark over the category of "paid browser extension" for me.

Knowing the source will be out there would fix that part for me - I may not be able to take over dev, but I could at least try to fix things that break until I find a replacement.

Thanks for explaining that. I forget the exact history, but I know they've changed up the extension types/APIs multiple times in the past few years. I think a lot of developers/companies gave up on them after being forced to rewrite.

To confirm, is the model you and the parent would like:

"After x units are sold, or after 12 months (whichever comes first), the project will be open sourced and changed to free in the App Store. It will then be supported with an optional in-app-purchase donation - with no nagging or feature differences."

I am interested and am also rebuilding vim from https://github.com/flippidippi/sVim for new Safari.

Yours looks great assuming it has all features of sVim and smooth scrolling with jk

Also the link hinting, can you please make it same as sVim with yellow background so it's easier to read.

Like this: https://i.imgur.com/I5orbAQ.png

Thank you. Looking forward to the release.

> I am interested and am also rebuilding vim from https://github.com/flippidippi/sVim for new Safari.

Good luck with the rebuild! I figured someone must be working on it but there weren't any GitHub issues last time I looked. Has it been hard to convert it to use the new App Extension API? There are quite a few things where I have to ask Swift to do things for me - since JS apis don't exist (creating new safari windows, etc.).

I didn't mention above but I started from scratch rather than using sVim/Vimium as a base (which would be okay since they are MIT licensed). I think there are some pros/cons to this. The main pro is that since I only have to worry about Safari 13+ I can use the latest features on the JS side. I am curious how my approach to various things compares to sVim/Vimium. I haven't looked at the source for them yet - but plan to once I'm done to check out the design differences.

> Yours looks great assuming it has all features of sVim and smooth scrolling with jk

It should be close - I still need to write the smooth scrolling polyfill - that's one of the trickier things left. I found some libraries but want to try doing it myself. I'm going to try and match the Safari pageUp/pageDn behavior as close as possible.

> Also the link hinting, can you please make it same as sVim with yellow background so it's easier to read.

Thanks for bringing that up. I intended to allow increasing the font size. I was hoping people liked my color choices, but you're right, it should be configurable. I'll add it to my todo list.

> Thank you. Looking forward to the release.

Thank you! Your feedback is really helpful!

There's Vimari [1] which works well enough.

[1] https://github.com/televator-apps/vimari

I have sVim on Safari
Vimium for Safari exists now, btw.
I love Vimium too! (using on chrome) Took me a while to learn all the shortcuts (thanks Anki!), but that was worth it. Wish it was more integrated to the browser though (having to wait for a page to finish loading before I can use a shortcut is sometimes annoying).

You're not mentioning my favorite Vimium command! m<key> to save a mark, and `<key> to load it. lowercase chars marks are in-page marks, and uppercase chars are global marks (like bookmarks).

You may want to have a look at vim-vixen but it's only available on firefox, I use vimium on chromium but prefer vim-vixen.
I see why people love the plugin. One thing that stops me from using Vimium is it doesn't support opening links in a new window. I don't like tabs and use my window manager to, well, manage my windows. Not being able to open links with "f" or "F" in a new window is a deal breaker, unfortunately.
Just curious, do you use Linux as your main desktop OS?
That's right. I have been using Debian GNU/Linux as my main laptop OS for about 13 years now. I used to have GNOME 2 desktop environment earlier but once GNOME 3 became the default, I switched to Xfce Desktop Environment. The fact that the Debian project still offers a CD image[1] with Xfce bundled as the default desktop environment is really nice.

Having said that, I have to confess that these days I also use macOS a lot. This has happened mainly due to my job. My employer provides MacBook Pro for work and I prefer not having to switch between operating systems too often, so my usage of Debian GNU/Linux as my main laptop OS has been on the decline. Despite that, I always keep a Debian virtual machine as well as a remote Debian system handy, so that I can log into it via SSH whenever I need it.

[1]: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/de...

The reason I ask is that Firefox is honestly poorly supported on Linux and you lose hardware video decoding, so watching videos in the browser causes horrendous performance. However, it is supported by Chromium and patched in many distros to work properly. I'm using Sway WM btw and run Arch so I get the latest stable releases of pretty much everything.
I've been using Debian and KDE | xfce | i3 (depending on machine and task) as my main desktop and laptop operating system for 2+ years. Once I learned how to install wifi firmware I haven't had any hardware issues. And it runs much faster than Win 10 did on my little celeron laptop.

I'll add my recommendation for qutebrowser. i3, rxvt, and vim are where I spend most of my time.