Vinzent03 / obsidian-advanced-uri

Advanced modes for Obsidian URI
MIT License
765 stars 44 forks source link

Is there a way to open a view to a specific column or offset? #173

Closed luckman212 closed 4 months ago

luckman212 commented 6 months ago

I had a look over the docs https://vinzent03.github.io/obsidian-advanced-uri/actions/navigation but I didn't see it. Is there any way to trigger Obsidian to open a view with the cursor at a specific position within the line (column)?

e.g.

obsidian://advanced-uri?filepath=My%20File&line=37&column=42
luckman212 commented 6 months ago

Followup question: Since the Omnisearch HTTP API returns match results with 0-based offsets instead of line numbers, it would be awesome to be able to generate a URI that opens a file at a specific absolute offset. Is this possible or considered?

luckman212 commented 6 months ago

I wrote a basic plugin to open a file by offset. See luckman212/obsidian-open-to-offset

This was a quick hack, and it would be great if Advanced URI rolled in this feature! 🙏