Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

mgsloan/roam-navigator

Repository files navigation

Note

Roam Navigator is now archived - I no longer maintain it. Let me know if you would like to take over maintenance, and I can have this page redirect to your fork.

Roam Navigator

Wherever you may Roam 🤘, it is essential to have an efficient navigator. This browser extension adds a navigation mode to Roam Research which presents visual navigation hints, that can be typed in order to select the corresponding link, block, or button. It also adds topbar "breadcrumbs" which allow you to quickly navigate to recent pages.

By default, navigation mode will be active when no input is focused. It can also be initiated by pressing Alt+g, or just g when not editing text. Visual navigation hints will then appear, allowing you to select links, starred pages, and select blocks to edit.

screenshot of Roam with navigation mode activated

Is it useful to you?

If you find this extension useful, feel free to show your appreciation on Buy Me a Coffee.

Details

Navigation mode is similar to the generic link clicking feature found in extensions like Vimium or SurfingKeys, but it does the following things better for the Roam usecase:

  1. Uses stable key sequences for left sidebar and editing blocks in your page. Attempts to use stable key assignments for clicking links in your page.

    • Stable key sequences for your starred pages mean that you can navigate to them even when the sidebar is not visible!
  2. You can open pages in the sidebar, by holding Shift while typing the last character of the navigation hint.

  3. It attempts to have more integrated visual layout of the hints, fitting them into the margins.

  4. Position of the hints update with scrolling and other page updates. In particular, when in navigation mode you can use the keyboard to scroll the main page with Spaceor Shift+Space to scroll half a page, and Down / Up arrows to scroll a bit.

    • To scroll the sidebar, first type s followed by the above scrolling shortcuts. s is used as a prefix for selecting links / blocks in the sidebar.
  5. By default, navigation mode is enabled on start, and enabled when focus exits input. You can then press Escape while editing a block to enter into navigation mode. This behavior can be disabled in the options if you prefer to press Alt+g / g.

How to use from repo

To load this repo as an extension, perhaps to make modifications (contributions welcome!), you can load it directly as an unpacked extension:

Chrome

  1. Go to: chrome://extensions
  2. Toggle: "developer mode" on.
  3. Click on: "Load unpacked"
  4. Select the src folder in this repo (no build step needed!)

Firefox

  1. Go to: about:debugging
  2. Select: "Enable add-on debugging"
  3. Click on: "Load Temporary Add-on…"
  4. Select the src folder in this repo (no build step needed!)

Attributions

Roam Navigator's icon was made by Pixel perfect from www.flaticon.com.

The top bar breadcrumbs was inspired by shodty's idea and code - see roam_breadcrumbs script.