davison185 downloadsSwitch to a note's tab when it is already open instead of opening a duplicate, before the duplicate tab is shown.
When you open a note that is already open in a tab, this plugin switches to that tab instead of opening a second copy. That includes tabs in other Obsidian windows of the same vault.
It works however you open the note: clicking a link, the quick switcher, the file explorer, search results, bookmarks, or other plugins that open files the standard way. The check runs before the new tab is drawn, so you never see a duplicate tab appear and then close.
[[Note#Heading]] or [[Note#^block]] switches to the existing tab and scrolls to the heading or block.From Obsidian, open Settings → Community plugins → Browse, search for "Focus Existing Tab", then install and enable it.
To try a release before it reaches the community plugin directory, install BRAT, add the beta plugin ChrisDavison/focus-existing-tab, then enable Focus Existing Tab under Settings → Community plugins.
You can also install it by hand: copy main.js, manifest.json, and styles.css from the latest release into <vault>/.obsidian/plugins/focus-existing-tab/, then enable the plugin.
The plugin wraps an internal method that Obsidian uses to open files in a tab, and finds open tabs through parts of the workspace that are not documented. A future Obsidian release could change these and stop the plugin from working. If anything unexpected happens while it searches for an open tab, the plugin steps aside and Obsidian opens the note as usual.
npm install
npm run build # bundles src/main.js into main.js
npm run dev # rebuilds on change
npm test # builds and checks tab matching
Copy main.js, manifest.json, and styles.css into a test vault's .obsidian/plugins/focus-existing-tab/ folder and reload the plugin.