✨ feat(browser): add new bindings to surfing-keys conf
This commit is contained in:
parent
32f6da6a74
commit
865d89c1f8
1 changed files with 37 additions and 11 deletions
|
@ -24,13 +24,6 @@ const {
|
||||||
vunmap,
|
vunmap,
|
||||||
} = api;
|
} = api;
|
||||||
|
|
||||||
// an example to create a new mapping `ctrl-y`
|
|
||||||
api.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).",
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
// toggle fullscreen, mainly because of YouTube
|
// toggle fullscreen, mainly because of YouTube
|
||||||
mapkey("F", "Fullscreen", function () {
|
mapkey("F", "Fullscreen", function () {
|
||||||
if (window.fullScreen) {
|
if (window.fullScreen) {
|
||||||
|
@ -40,11 +33,44 @@ mapkey("F", "Fullscreen", function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
|
// Copy URL
|
||||||
api.map("gt", "T");
|
map("yu", "ya");
|
||||||
|
|
||||||
// an example to remove mapkey `Ctrl-i`
|
// Buffers/Tabs
|
||||||
api.unmap("<ctrl-i>");
|
map("b", "T");
|
||||||
|
|
||||||
|
// History Back/Forward
|
||||||
|
map("H", "S");
|
||||||
|
map("L", "D");
|
||||||
|
|
||||||
|
// Next/Prev Page
|
||||||
|
map("K", "[[");
|
||||||
|
map("J", "]]");
|
||||||
|
|
||||||
|
// Scroll Page Down/Up
|
||||||
|
mapkey("<Ctrl-d>", "Scroll down", () => {
|
||||||
|
Normal.scroll("pageDown");
|
||||||
|
});
|
||||||
|
mapkey("<Ctrl-u>", "Scroll up", () => {
|
||||||
|
Normal.scroll("pageUp");
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- Tabs ---
|
||||||
|
// Tab Delete/Undo
|
||||||
|
mapkey("d", "#3Close current tab", () => {
|
||||||
|
RUNTIME("closeTab");
|
||||||
|
});
|
||||||
|
mapkey("u", "#3Restore closed tab", () => {
|
||||||
|
RUNTIME("openLast");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Move Tab Left/Right w/ one press
|
||||||
|
map(">", ">>");
|
||||||
|
map("<", "<<");
|
||||||
|
|
||||||
|
// Tab Next/Prev
|
||||||
|
map("<Ctrl-l>", "R");
|
||||||
|
map("<Ctrl-h>", "E");
|
||||||
|
|
||||||
// set theme
|
// set theme
|
||||||
Hints.style(
|
Hints.style(
|
||||||
|
|
Loading…
Add table
Reference in a new issue