kuberrr073 downloadsRemoves tabs and the tab bar. Whatever you open replaces what's currently open, so there is only ever one tab.
An Obsidian plugin that removes tabs. Whatever you have open is the only tab, and the tab bar is gone.
The sidebar toggle buttons still work. They float in the note's header when a sidebar is collapsed. On macOS the header leaves room for the window buttons (close, minimise, full screen), and you can move the window by dragging the empty space beside the note title.
| Action | With this plugin |
|---|---|
| Cmd/Ctrl+click a link | Opens in the current tab |
| New tab (Cmd/Ctrl+T) | Replaces the current note with an empty page |
| Close tab (Cmd/Ctrl+W) | Closes the note and leaves an empty page |
| Enabling the plugin | Closes every open tab except the one you're viewing |
Disabling the plugin restores normal tab behaviour. Tabs it already closed don't come back.
The plugin isn't in the community plugin directory yet. To install it manually:
main.js, manifest.json and styles.css from this repository.<your vault>/.obsidian/plugins/remove-tabs/ and put the three files in it.You can also install it with BRAT using the repository kuberrr0/obsidian-remove-tabs.
Requires Obsidian 1.5.0 or later. Tested on Obsidian 1.12.7 on macOS with the hidden title bar style. The plugin doesn't block mobile, but it hasn't been tested there.
Hiding the tab bar is pure CSS, but stopping tabs from being created needs JavaScript, and themes can only contain CSS. With only the CSS, links would still open in tabs; you just couldn't see or switch to them.
main.js wraps workspace.getLeaf() so requests for a new tab return the current leaf instead. After every layout change, it collapses any tab group in the main area or a popout window down to its visible tab.styles.css dissolves the main area's tab header container. Only Obsidian's sidebar toggle buttons, which Obsidian parks there when a sidebar is collapsed, stay visible. The CSS also adds header padding for the toggles and window buttons and limits the window drag area to the title.