Skip to content

Instantly share code, notes, and snippets.

@y9c
Forked from rynffoll/surfingkeys.js
Last active October 28, 2017 04:30
Show Gist options
  • Save y9c/c08a9eddf4d62e276353ec1f1a5392e7 to your computer and use it in GitHub Desktop.
Save y9c/c08a9eddf4d62e276353ec1f1a5392e7 to your computer and use it in GitHub Desktop.
Surfingkeys Config
// unmap some system key
unmap('<Ctrl-j>');
// mapping like vimum
map('u', 'e');
mapkey('p', "Open the clipboard's URL in the current tab", function() {
Front.getContentFromClipboard(function(response) {
window.location.href = response.data;
});
});
map('P', 'cc');
map('gi', 'i');
map('F', 'af');
map('gf', 'w');
map('`', '\'');
// save default key `t` to temp key `>_t`
map('>_t', 't');
// create a new key `t` for default key `on`
map('t', 'on');
// create a new key `o` for saved temp key `>_t`
map('o', '>_t');
map('H', 'S');
map('L', 'D');
map('gt', 'R');
map('gT', 'E');
map('K', 'R');
map('J', 'E');
// using numbers for follow links
Hints.characters = 'asdfghjklqwertyuiopzxcvbnm';
// smooth scrolling
settings.smoothScroll = false;
// styles
Hints.style('border: solid 3px #3a5f82; color:#fff; background: initial; background-color: #3a5f82; font-size: 10pt;');
Visual.style('marks', 'background-color: #89a1e2;');
Visual.style('cursor', 'background-color: #6590b7;');
// click `Save` button to make above settings to take effect.
// set theme
settings.theme = '\
.sk_theme { \
background: #fff; \
color: #000; \
font-size: 12pt; \
} \
.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