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.

1 Like

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...