Retain search query on focus (0.8.0)

There are times when I want to toggle focus from notes to search using the keyboard, and I don’t want to lose the search query. Currently, the search command always clears the query. I’m not sure whether the search query should always be retained, or there should be a separate command to “focus on search”. Alternately a command to focus on the sidebar would also work.

3 Likes

Or maybe a history of search commands? Place cursor in search and your history drops down. Maybe that would be too annoying, but it could be a toggle on/toggle off.

Maybe it could be solved with Allow Multiple search panes at the same time
For example Main search pane in sidebar would be target of hotkey “Search in all files” which replaces search string by selected text as it does now. While other search panes not targeted by this hotkey would as a side-effect retain it’s search string. They can be activated conveniently by Hotkey to "Focus on last active pane".

Also concept of “cursor”/“current line” should be introduced into lists of search results and backlinks, that would keep last selected result highlighted while switching between panes. Similarly to edit mode: Improving visibility of caret(cursor) position in editor mode