bwya776k downloadsAutomatically adjusts tab header widths to fit each tab's title content.
Automatically adjusts tab header widths in real-time to perfectly fit each tab's title content while maintaining a clean, seamless interface that prevents awkward text truncation and ensures optimal readability of your document titles.
.obsidian/plugins/autofit-tabs/ directoryOnce installed and enabled, AutoFit Tabs works automatically with no additional configuration needed. The plugin will immediately begin adjusting your tab widths to fit their content.
You can customize the following settings in the plugin options:
| Setting | Description | Default |
|---|---|---|
| Close button left padding | Space in pixels before close button | 30 |
| Close button right padding | Space in pixels after close button | 8 |
| Transition duration | Duration in milliseconds for smooth transitions | 375 |
| Ignore pinned tabs | Do not modify pinned tabs (keeps default behavior) | false |
| Hide tab icons | Hide all icons in tabs | false |
| Setting | Description | Default |
|---|---|---|
| Minimum width | Minimum width in pixels for very short titles | 40 |
| Max width | Maximum width in pixels for tabs (0 to disable) | 0 |
| Setting | Description | Default |
|---|---|---|
| Icon width | Width in pixels for tab icons | 20 |
| Left padding | Padding in pixels before the icon | 12 |
If you find this plugin helpful, you can:
Want to contribute or modify the plugin? Here's how to get started with the source code:
Create a directory for your GitHub projects:
cd path/to/somewhere
mkdir Github
cd Github
Clone the repository:
git clone https://github.com/bwya77/autofit-tabs.git
Navigate to the plugin directory:
cd autofit-tabs
Install dependencies:
npm install
Start development build mode:
npm run dev
This command will keep running in the terminal and automatically rebuild the plugin whenever you make changes to the source code.
You'll see a main.js file appear in the plugin directory - this is the compiled version of your plugin.
To test your modifications:
.obsidian/plugins/ directoryMIT License. See LICENSE for full text.