Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
luckman212 opened this issue May 18, 2024 · 2 comments
Closed

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

luckman212 opened this issue May 18, 2024 · 2 comments

Comments

@luckman212
Copy link
Contributor

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 luckman212 changed the title Is there a way to open a view to a specific column? Is there a way to open a view to a specific column or offset? May 18, 2024
@luckman212
Copy link
Contributor Author

luckman212 commented May 18, 2024

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
Copy link
Contributor Author

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! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant