I’d like to request improvement/ask for guidance witgh current file searching/finding. The exisiting options are:
search using Search core plugin
problem: must type ‘file:filename content:’ first, not smooth
find using “Search current file” command
problem: doesn’t highlight found instances on scrollbar nor on page (like what would happen in the browser or google docs), doesn’t help me much
If anyone has a workaround or very minimal plugins/scripts suggestion please shoot. The most ideal tool would do 1 and 2 simulatneously (ie. displaying the search results in a pane AND highlighting found instances in the editor)
A second smaller part of this that would be nice is the ability to open multiple Search panes. for example I could keep one in left sidebar to search globally and keep one in right sidebar to search within file (I’d just keep the ‘file:filename content:’ prefix sitting in that one and nothing in the other). I know this is possible but I can’t figure out how to replicate it myself. Not sure how the hotkey situation here would work but thats another problem
Edit: New idea - it’d be cool to do searching in the outline tab, that way it keeps concerns separated a bit better. you can already search through headings, why not text too?
You do not provide suggestions on how this could be “smoother”.
You also plainly can type keywords here. Then anything where any of these keywrds are found, will be retrieved. It cannot be smoother than that.
To exert more control, there must be a system. Currently, that system is with tags that you type. To some people, that will be the most efficient way. You must type to enter keywords, so you can as well also type to give instructions about the search. Having to click around to fine tune the search may be found less efficient by some users, but indeed your mileage may vary. Still, it would help if you provide more specically of what you would consider a more smooth approach.
That, I cannot reproduce. For me, using the default theme, the first instance of the search term is highlighted. I can move to the next with the down arrow or hitting F3 on the keyboard. To highlight all found instances, it takes a click on the “Find all” button, or hitting Alt+Enter on the keyboard.
For anyone coming across this post looking for something similar to what I was, the answer is the “Another Quick Switcher” plugin. It is honestly just better in every way. I use:
“File name fuzzy search” - replaces the normal Quick Switcher
“In file Search” - replaces the core Search + `file:filename content:’ (doesn’t work quite in the same way as Search in File (cmd+F usually), but supplements it well)
“Grep” - replaces core Search completely using the command line tool ripgrep, for those that don’t code this functionality might be hard to set up though since you need to install ripgrep (I also had to mess around with PATH which was annoying).
It also has a bunch of other great search types like just for headings or backlinks and you can evenMake your own search types.
I completely disabled Search and Quick Switcher with this. Note though that grep can’t be installed on mobile so you might want to keep Search around for this reason
It’s a bit too late to be responding to you but reading back on my original post I honestly didn’t explain what I wanted all that well, partly because I was thinking in terms of pre-existing features. I mostly figured out what I needed though as far as searching goes.
For finding (Search in File) I’m aware of the Find all feature but I wanted the highlights to also show their position on the scroll bar, not just to highlight every instance on the page. Part of the reason for this is that when you click out of the Search in File context, it unhighlights everything which makes it really difficult to for certain “workflows” for lack of a better word. In Chrome or VScode the scroll bar is highlighted (and stays highlighted) at the position of every highlight in the file which gives you a nice top down view of whats going on, especially for files longer than one screen height. I’d still like this feature a lot but its ndb.
in the same vein, highlights, whether highlighted with Find All or not, disappear when clicking out of the search context which is also a slightly annoying thing that I’d like fixed. For me this makes this finding feature almost useless because it feels so unergonomic.