Skip to content

Instantly share code, notes, and snippets.

@mitcdh
Created February 26, 2026 11:27
Show Gist options
  • Select an option

  • Save mitcdh/ba20279f24e20094bab07d6524f84a47 to your computer and use it in GitHub Desktop.

Select an option

Save mitcdh/ba20279f24e20094bab07d6524f84a47 to your computer and use it in GitHub Desktop.
Surfing Keys Configuration
// ==========================================
// VIMPERATOR / PENTADACTYL CONFIGURATION
// ==========================================
// --- Tab Management ---
api.map('d', 'x'); // Close current tab (Vimp: d | Default: x)
api.map('u', 'X'); // Restore closed tab (Vimp: u | Default: X)
api.map('J', 'E'); // Go one tab left (Vimp: J | Default: E)
api.map('K', 'R'); // Go one tab right (Vimp: K | Default: R)
// --- Hinting ---
// Vimperator traditionally used numbers for hinting, but letter-hinting is generally faster.
// If you want home-row only letters for hints (like Pentadactyl's default letter mode):
api.Hints.setCharacters("asdfghjkl");
// --- History Navigation ---
api.map('H', 'S'); // Go back in history (Vimp: H | Default: S)
api.map('L', 'D'); // Go forward in history (Vimp: L | Default: D)
// --- Omnibar / URL Navigation ---
api.map('o', 'go'); // Open URL/Search in current tab (Vimp: o | Default: go)
// Map 'O' to edit the current URL and open in the current tab
api.mapkey('O', 'Edit current URL in current tab', function() {
api.Front.showEditor(window.location.href, function(data) {
window.location.href = data;
}, 'url');
});
// Map 'T' to edit the current URL and open in a new tab
api.mapkey('T', 'Edit current URL in new tab', function() {
api.Front.showEditor(window.location.href, function(data) {
api.tabOpenLink(data);
}, 'url');
});
// Unapi.map original default keys to avoid accidental triggers
api.unmap('x');
api.unmap('X');
api.unmap('E');
api.unmap('R');
api.unmap('S');
api.unmap('D');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment