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

Any way to show multiple hits in the same note when querying / searching? #83

Open
riwoodward opened this issue Jun 26, 2024 · 2 comments
Labels
tangent-electron Issues relating to the Tangent Application itself. User Request Features & Enhancements requested by users.

Comments

@riwoodward
Copy link

The query tool is a nice way to find content in notes. I like the card view which shows the queried string in the context of the note.

However, it can be difficult to find what you want when a note contains the string more than once, since Tangent only shows the first 'hit' in each file and gives no indication there are other hits later in the file.

Consider the following Markdown file as an example:

There is some content here.

### FINDME here.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Maecenas porttitor congue massa.

Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.

Nunc viverra imperdiet enim.

Fusce est.

Vivamus a tellus.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.


### FINDME here too.

Proin pharetra nonummy pede.

Mauris et orci.

Aenean nec lorem.

When I query for the string FINDME, Tangent shows clearly the first sentence containing it, but there's no indication that a 2nd sentence also contains FINDME in the note:

image

Of course I can scroll down within the note while in query view to find the other FINDME reference highlighted in green, but this doesn't work well when there are many notes to look through (or long notes).

As an example of other software that does this nicely, I mention Zettlr. Using the same query approach there, I see:

image
Clicking on the line in Zettlr's query sidepanel jumps to the line in the note itself, so it's very easy to find all times a string appears in a note and jump to it.

Perhaps Tangent could consider enhancing the query results view to include the case for multiple hits within a single file. Maybe each card (i.e. file) could have a number on the preview showing "number of hits", or even a forwards/backwards button so the user can cycle through them quickly while previewing the little card? Just an idea.

@taylorhadden
Copy link
Contributor

Yes, definitely a limitation. I like your notion of having some way of moving between highlighted sections. That's a good idea.

One eventual improvement I want to make to queries is being able to display things at a sub-note level, e.g. Lines with .... A significant piece of work, but it would multiply the utility of the query system.

@taylorhadden taylorhadden added tangent-electron Issues relating to the Tangent Application itself. User Request Features & Enhancements requested by users. labels Jun 28, 2024
@riwoodward
Copy link
Author

Thanks and yes, that proposed sub-note level querying would be an amazing feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tangent-electron Issues relating to the Tangent Application itself. User Request Features & Enhancements requested by users.
Projects
Status: No status
Development

No branches or pull requests

2 participants