Possible to automate pane-opening?

I’m trying to accomplish the following:

  • Whenever I open certain notes, Obsidian should open 3 panes automatically. One pane should contain the note itself, the other two panes should contain the same note but scrolled to different headings.
  • So the note opens like this:

Panes 2 & 3 are opened automatically and scrolled to certain headings. Alternatively panes 2 & 3 are already opened and just automaticaly open the correct note and scroll automatically.

Would there be a plugin that could help with this?

The Workspaces core plugin will let you save that layout, but I don’t think it saves the scroll position. There’s a community plugin called Remember Cursor Position that remember cursor and scroll position (I don’t know how well it handles multiple tabs of the same note).

Thanks for your replies. I managed to solve it by adding a Quickadd-script, copied below. It gets the current file, then opens its parent headings in two separate panes to the side.

module.exports = async function openFileInSplitViews(params) {
  const { app } = params;

  const activeFile = app.workspace.getActiveFile();

  app.workspace
    .getLeaf("split", "vertical")
    .openLinkText(activeFile.parent.name + "#Info", "");

  app.workspace
    .getLeaf("split", "horizontal")
    .openLinkText(activeFile.parent.name + "#Activities", "");
  return;
};```
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.