Surfingkeys: Vim Keys in Every Browser

November 20, 2022 (4y ago)

The Last Frontier

I had conquered:

  • ✅ Terminal (Vim)
  • ✅ Code editor (Neovim)
  • ✅ Window management (Yabai)

But the browser? That was still a mouse zone.

Then I discovered Surfingkeys.

What is Surfingkeys?

Surfingkeys is a Chrome/Firefox extension that provides Vim-like keyboard navigation for the entire browser.

  • 500,000+ users
  • Open source (MIT license)
  • Highly customizable

According to their GitHub:

"Make your browsing experience with vim."

The Problem

Every time I reached for the mouse in the browser:

  1. Hand travel time: 200ms+ to reach mouse
  2. Visual search: Find the link/button
  3. Precision click: Aim and click
  4. Return: 200ms+ back to keyboard

That's 500ms+ per interaction. Over a day, that's hours lost.

The Surfingkeys Solution

| Key | Action | |-----|--------| | h/j/k/l | Scroll down/up/left/right | | d/u | Page down/up | | gg/G | Top/bottom of page | | f | Click link by visual hint | | F | Click link in new tab |

The Magic: Visual Hints

Press f and Surfingkeys highlights every link with letters:

[a]First link
[b]Second link
[c]Third link

Press a and it clicks the first link. Zero mouse required.

Searching

/  Search on page
n  Next match
N  Previous match

My Configuration

// ~/.surfingkeys.js
settings.defaultBrowserEngine = 'chromium';
settings.smartPageBound = 30;

unmap('a');
unmap('s');
unmap('d');
unmap('f');
unmap('x');
unmap('z');

mapkey('x', 'Close tab', 'browser.closeTab()');
mapkey('z', 'Reopen closed tab', 'browser.reopenClosedTab()');
mapkey('s', 'Quick find', 'Surfingkeys.quickFind()');
mapkey('d', 'Scroll half page down', 'window.scrollBy(0, window.innerHeight/2)');
mapkey('a', 'Scroll half page up', 'window.scrollBy(0, -window.innerHeight/2)');

The Workflow

Before Surfingkeys

  1. See link
  2. Reach for mouse
  3. Find cursor
  4. Hover link
  5. Click

After Surfingkeys

  1. Press f
  2. See highlighted letters
  3. Press c
  4. Done

Time saved: ~400ms per link click

Real Usage Numbers

| Task | Mouse Time | Surfingkeys | |------|-----------|-------------| | Open 10 links | 5s | 2s | | Scroll to bottom | 3s | 0.5s | | Find on page | 4s | 1s | | Daily savings | ~20 min | — |

Advanced Features

Blacklists

Don't show hints on specific sites:

blacklist: /.*\.google\.com.*/,
          /.*facebook\.com.*/

Custom Mappings

mapkey('go', 'Open GitHub notifications', 
  'window.open("https://github.com/notifications")');
mapkey('gy', 'Open YouTube', 
  'window.open("https://youtube.com")');

Page Scripts

Run JavaScript on pages:

pageScript: `
  // Auto-expand all comments on Reddit
  document.querySelectorAll('.expand').forEach(e => e.click());
`

Comparison with Other Tools

| Tool | Platform | Vim Mode | Customization | |------|----------|----------|----------------| | Surfingkeys | Chrome/Firefox | ✅ | High | | Vimium | Chrome | ✅ | Medium | | Tridactyl | Firefox | ✅ | High | | nativeBrowser | - | ❌ | - |

Surfingkeys wins on:

  • Cross-browser support
  • Customization
  • Visual hints quality

The Browser is the New Desktop

Here's the vision:

Desktop     Terminal     Browser     AI Agent
(mouse)    (keys)       (keys)       (autonomous)

Each step removes more friction:

  • Terminal: No GUI overhead
  • Browser: Universal access to web
  • AI Agent: Works while you sleep

Surfingkeys is the bridge between keyboard coding and keyboard browsing.

The ROI

For $0 (free and open source):

  • 20+ minutes/day saved
  • Reduced context switching
  • Consistent workflow across apps

That's ~120 hours/year. For free.

Conclusion

The browser is where we spend most of our digital time. Making it keyboard-driven completes the keyboard-first workflow.

Surfingkeys isn't just a Vim emulation. It's the final piece of the productivity puzzle.


References


Next: The Zero-UI Computer