Skip to content

Instantly share code, notes, and snippets.

@thameera
Last active March 22, 2023 21:59
Show Gist options
  • Save thameera/8c846c48fd1c9f859cf602931e18a502 to your computer and use it in GitHub Desktop.
Save thameera/8c846c48fd1c9f859cf602931e18a502 to your computer and use it in GitHub Desktop.
SurfingKeys config
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Normal.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// Map disabling surfing keys hotkey
map('<Ctrl-i>', '<Alt-s>');
// Free up Alt-s for jetzt's use
unmap('<Alt-s>');
// an example to replace `u` with `?`, click `Default mappings` to see how `u` works.
map('?', 'u');
// 'u' for page up
map('u', 'e');
// Set H and L for back/forward
mapkey('S', '#8Open opened URL in current tab', 'Normal.openOmnibar({type: "URLs", extra: "getTabURLs"})');
mapkey('H', '#4Go back in history', 'history.go(-1)');
mapkey('L', '#4Go forward in history', 'history.go(1)');
// Tabs
mapkey('gT', '#3Go one tab left', 'RUNTIME("previousTab")');
mapkey('gt', '#3Go one tab right', 'RUNTIME("nextTab")');
settings.blacklistPattern = /.*mail.google.com.*|.*inbox.google.com.*|trello.com|duolingo.com|youtube.com|udemy.com|localhost/i;
// Prevent automatic next/previous page loads
settings.smartPageBoundary = false;
// an example to remove mapkey `Ctrl-i`
// unmap('<Ctrl-i>');
// click `Save` button to make above settings to take effect.
// set theme
settings.theme = '\
.sk_theme { \
background: #fff; \
color: #000; \
} \
.sk_theme tbody { \
color: #000; \
} \
.sk_theme input { \
color: #000; \
} \
.sk_theme .url { \
color: #555; \
} \
.sk_theme .annotation { \
color: #555; \
} \
.sk_theme .focused { \
background: #f0f0f0; \
}';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment