Skip to content

Instantly share code, notes, and snippets.

@gwarf
Last active September 8, 2017 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwarf/c01ca24a35e1e2f823209f4a534ac1e7 to your computer and use it in GitHub Desktop.
Save gwarf/c01ca24a35e1e2f823209f4a534ac1e7 to your computer and use it in GitHub Desktop.
.surfingkeys.js
// https://brookhong.github.io/2015/09/15/surfingkeys.html
// version 2.0
// align then hint to the right
settings.hintAlign = "left";
// hint characters
Hints.characters = "asdfghjkl;";
// intercept all error pages so Surfing keys can work on them
settings.interceptedErrors = ["*"];
// turn off smoothscroll
settings.smoothScroll = false;
// show the current mode in the status bar
settings.showModeStatus = true;
// open new tabs to the right of the current one
settings.newTabPosition = "right";
// disable smart page boundry jump next/previous
settings.smartPageBoundary = false;
// make Google translate languages clickable
settings.clickableSelector = "*.jfk-button, *.goog-flat-menu-button";
// show only tabs from the current window
settings.omnibarTabsQuery = {currentWindow: true};
// Follow link?
// map f
// Follow in new active tab: af
// map F
// Follow in new background tab: gf
// map F
// Previous page in history: H
// Change scroll target (iframe): cs
// Search with google (selected word or clipboard)
// Launch search: sg
// Launch search adding site:XXX: sog
// Edit search: sG
// Edit search adding site:XXX: soG
// g is the searchalias for google define in the chrome conf
addSearchAliasX('s', 'stackoverflow', 'http://stackoverflow.com/search?q=', 'o');
addSearchAliasX('p', 'nar', 'http://newalbumreleases.net/?s=%s', 'o');
addSearchAliasX('q', 'qwant', 'https://www.qwant.com/?q=%s&client=opensearch', 'o');
addSearchAliasX('d', 'drive', 'https://drive.google.com/drive/search?q=%s', 'o');
addSearchAliasX('g', 'github', 'https://github.com/search?q=%s&ref=opensearch', 'o');
// Edit URL to open in new tab
// su
// Edit settings: se
// Edit input with vim editor: I
// Markdown preview from clipboard
// sm (preview markdown)
// sm (show/edit markdown)
// :wq (update preview)
// Show usage: ?: us
// Search with default search engine or open from clipboard
// map p in new tab
// map P in current tab
// Add bookmark with a
// Access tab/buffer with b
// Disable for sites X
// vim:ft=javascript:foldmethod=marker:foldlevel=0:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment