Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1003 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 1003 Bytes

Obsidian Open to Offset Plugin

Registers a URI Scheme (protocol handler) to allow opening a file to a specific absolute offset. scrollIntoView() is executed to attempt to center the view around your requested offset.

Right now this is primarily useful as a companion to Omnisearch, since those results are given in offset rather than line/column.

Install

For now, install must be done manually.

  1. Download and unzip the latest release
  2. Place the expanded folder in your .obsidian/plugins directory
  3. Enable the plugin in Settings → Community plugins

How to use

Pass file and offset as URL params:

open 'obsidian://open-to-offset?file=MyFile.md&offset=1234'

There is some basic bounds checking, if you supply an offset greater than the length of the file, it will scroll to the end of the file instead rather than emitting an error.