Glide is in very early alpha. There will be many missing features and bugs.

Cookbook

Modular config examples you can copy and adapt.

Set a pref for a specific website #

glide.prefs.set("privacy.resistFingerprinting", true);

glide.autocmds.create("UrlEnter", {
  hostname: "example.com",
}, () => {
  glide.buf.prefs.set(
    "privacy.resistFingerprinting",
    false,
  );
});
Ignore keymappings for a specific website #

glide.autocmds.create("UrlEnter", {
  hostname: "example.com",
}, async () => {
  await glide.excmds.execute("mode_change ignore");
  return () => glide.excmds.execute("mode_change normal");
});
Override a keymap for a specific website #

glide.autocmds.create("UrlEnter", {
  hostname: "example.com",
}, async () => {
  glide.buf.keymaps.set(
    "normal",
    "f",
    "hint --include=\"svg\"",
  );
});
Delete a keymap for a specific website #

glide.autocmds.create("UrlEnter", {
  hostname: "example.com",
}, async () => {
  glide.buf.keymaps.del("normal", "f");
});
Split the config into multiple files #

// glide.ts
glide.unstable.include("opts.glide.ts");

// opts.glide.ts
glide.g.mapleader = "~";
glide.o.which_key_delay = 500;
Map one key to another key #

glide.keymaps.set("normal", ";", "keys :");
Text macros #

glide.keymaps.set("normal", "<leader>ts", async () => {
  await glide.keys.send("i"); // switch to insert mode
  await glide.keys.send("¯\\_(ツ)_/¯"); // "type" the keys
  await glide.keys.send("<esc>"); // exit insert mode
});
Keymap for switching to a tab #

glide.keymaps.set("normal", "gt", async () => {
  const tab = await glide.tabs.get_first({
    url: "example.com",
  });
  assert(tab && tab.id);
  await browser.tabs.update(tab.id, { active: true });
}, { description: "[g]o to example.com" });
Custom keymappings for navigating the command line #

glide.keymaps.set(
  "command",
  "<c-j>",
  "commandline_focus_next",
);
glide.keymaps.set(
  "command",
  "<c-k>",
  "commandline_focus_back",
);
Set a custom homepage #

glide.prefs.set(
  "browser.startup.homepage",
  "https://example.com",
);