Skip to content

Instantly share code, notes, and snippets.

@jsn
Created March 5, 2020 22:07
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 jsn/e6be52de206573bd93ba81654a9c1e39 to your computer and use it in GitHub Desktop.
Save jsn/e6be52de206573bd93ba81654a9c1e39 to your computer and use it in GitHub Desktop.
unmap('i') ;
map('iu', 'g0') ;
map('io', 'g$') ;
map('ij', '<Ctrl-6>') ;
map('d', 'x') ;
map('u', 'X') ;
map('ih', 'S') ;
map('il', 'D') ;
map('gn', "<Ctrl-'>");
settings.scrollStepSize = 250 ;
settings.stealFocusOnLoad = true ;
settings.enableAutoFocus = true ;
mapkey('gi', '#1Go to edit box', function() {
Hints.create("input, textarea, *[contenteditable=true], *[role=textbox], select", Hints.dispatchMouseClick);
});
// open URL from clipboard
mapkey('p', '#3Open URL from clipboard', () => {
Clipboard.read(response => {
window.location.href = response.data;
});
});
mapkey('P', '#1Open URL from clipboard in a new tab', () => {
Clipboard.read(response => {
window.open(response.data);
});
})
addSearchAliasX('i', 'imdb', 'https://www.imdb.com/find?s=all&q=');
addSearchAliasX('w', 'wikipedia', 'http://en.wikipedia.org/wiki/Special:Search?search=') ;
// // an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment