Skip to content

Instantly share code, notes, and snippets.

@ashkrosh
Last active March 25, 2025 09:22
Show Gist options
  • Save ashkrosh/e9d414a5bc74859d636b1845b85b4236 to your computer and use it in GitHub Desktop.
Save ashkrosh/e9d414a5bc74859d636b1845b85b4236 to your computer and use it in GitHub Desktop.
surfingkyes
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,
unmap,
unmapAllExcept,
vunmap,
cmap,
addSearchAlias,
removeSearchAlias,
tabOpenLink,
readText,
Clipboard,
Front,
Hints,
Visual,
RUNTIME,
Normal.disable
} = api;
// Disable Surfingkeys on Google Docs, Slides, and Sheets
if (/docs\.google\.com|slides\.google\.com|sheets\.google\.com/.test(location.hostname)) {
Normal.disable();
} else {
// On other domains, allow only the 'x' binding (adjust the regex as needed)
unmapAllExcept(['x'], /(web\.clay\.earth|notion\.so|meet\.google\.com|mail\.google\.com|read\.readwise\.io)/i);
}
// click `Save` button to make above settings to take effect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment