Scroll note list to current note

Is there a way to force the note list to scroll to the current note? If not, is this something that could be done in a plugin? I'm a software developer, so I wouldn't mind attempting this, but I'm unclear about whether it could be done in a plugin or would need to go into the core product.

2 Likes

This would be a very welcome feature! It's not ideal to have to go hunting in a long note list to get access to the context menu of the current note, particularly for users who stack the Notebook and Notes panels in a single panel.

An existing plug-in Auto show active note in sidebar is almost there, it selects the note but does not bring it into view. It works well for a short list, but with a long list you need to scroll and search for the highlighted note.

How difficult it would be force the note into the portion of the list in view, or if it's even possible, I've no idea, but maybe the code for the above might give you some ideas. Good luck if you give it a try!

There seems to exist the command :focusElementSideBar for the notebook/tags sidebar and :focusElementNoteList for the note list. For me, however, the focusElementNoteList doesn't work when the current note isn't visible in the sidebar.

For now, a workaround might be:

  1. Click the search box.
  2. Press tab four times.
  3. Press the down arrow key.
  4. Press the up arrow key.

Other workarounds include clicking the current notebook or using the :focusElementSideBar command then pressing Enter.

If the All notes notebook is selected, only the latter workaround works. It also scrolls the sidebar to the notebook containing the current note, then selects it.

The :focus commands do not work for me. The clever click-in-search, tabx4, arrow-keys works, but is a bit of a hack. I would still like to know if this is the kind of thing that can be done in a plugin or not. Guess I'll experiment...

:focusElementNoteList should be fixed by this commit:

Pressing shift-tab from the note title input should also now scroll to the selected note.

Unfortunately it still doesn't work reliably on Joplin 3.1.1. (sometimes it works, sometimes it doesn't, can't figure out under what conditions)

1 Like

How about giving a try on GitHub - leenzhu/joplin-plugin-revnav: Let the sidebar navigate to current opened note.

Hope it helpful! :smile:

Does this mean that you have made a plugin for that? :pray: Would you mind to „publish“ it the way, that Joplin can integrate it via the implemented plugin process in the Joplin-app (via configuration -> plugins…).

Sorry if I misunderstand your posting, I’m not a technical person….

@Wimvan Sorry, perhaps I may have misunderstood the request. I haven't found any method to scroll the note list, the plugin as I referred only expands and scrolls the sidebar rather than note list.

By the way, the plugin RevNav has already been published on Joplin Plugins - RevNav

1 Like

@leenzhu My bad english was the problem here, sorry for that unnecessary request and thanks a lot for your immediate reply, which made things clear to me!