A plugin for Obsidian that enables you to easily adjust the editor's line width on a note-by-note basis. All these following options ensure that users have a tailored experience, making line width adjustments both efficient and user-friendly. To make this task more intuitive and adaptable to your preferences, the plugin offers several methods:
- Employ a straightforward slider or textbox situated in the status bar for quick and visual adjustments.
- For users who prefer to work with YAML front matter there is an option to set a custom width through YAML, allowing you to maintain specific formatting or structures in your notes.
- Integrated commands have been added, which can be executed directly within the Obsidian interface. This is especially handy for users who prefer quick actions or are accustomed to using keyboard shortcuts, offering a seamless way to modify the line width without diving into settings or codes.
- Customize line width for individual notes (or all notes) using a convenient slider in the status bar.
- Support for multiple width units: % (percentage), px (pixels), and ch (character widths).
- Easily increase or decrease line width to tailor your editing experience.
- User-friendly interface for intuitive usage.
- Fully customizable through settings for personalized adjustments.
Once you enable the plugin in the settings menu, a slider will appear in the bottom right status bar. With this plugin, you can easily make real-time adjustments to the width of notes using either the slider or the textfield, ensuring a smooth and seamless editing experience.
The plugin supports three width units:
- % (Percentage): Width relative to the editor pane (0-100%).
- px (Pixels): Absolute width in pixels (100-4000px).
- ch (Characters): Width based on character count (10-200ch).
You can switch between units by clicking the unit label next to the value in the status bar. The slider range adjusts automatically to match the selected unit.
- Default width unit: Choose the default unit (%, px, or ch) for the note width.
- Default width: Set the default width value for notes without a per-note width.
- Per-note width: Enable or disable individual widths per note via YAML frontmatter.
- YAML front matter key: Customize the key used in YAML frontmatter (default:
custom-width).
- Enable or disable the slider
- Enable or disable the textbox
- Adjust the slider width
The plugin can be found in the Community Plugins directory which can be accessed from the Settings pane under Third Party Plugins.
- Download custom-note-width.zip located at latest release
- Extract the obsidian-custom-note-width folder from the zip to your vault's plugins
folder:<vault>/.obsidian/plugins/Note: On some machines the.obsidianfolder may be hidden. On MacOS you should be able to pressCommand+Shift+Dotto show the folder in Finder. - Reload Obsidian
- If prompted about Safe Mode, you can disable safe mode and enable the plugin.
IT'S IMPORTANT TO REGULARLY MAKE BACKUPS! DON'T FORGET TO PROTECT YOUR DATA!
Disclaimer: This plugin modifies the CSS variable
--file-line-widthto control the editor's line width. Custom themes may override or interfere with this variable, which can cause the plugin to malfunction. There is no guarantee that this plugin works with every custom theme.The plugin requires "Readable line length" to be enabled in Obsidian's Editor settings (
Settings > Editor > Readable line length).
| Theme | Status | Obsidian Version | Notes |
|---|---|---|---|
| Default | Works | 1.12.4 | Fully functional |
| Things | Works | 1.12.4 | Fully functional |
Your theme is not listed? If you have tested the plugin with a theme not listed above, please submit a Pull Request to add it to the table. This helps other users know which themes are compatible.
To contribute:
- Fork this repository
- Edit the table in
README.mdand add your theme with its status - Submit a Pull Request with the title:
Theme compatibility: [Theme Name]
If you encounter an issue, please create a new issue on GitHub. To help me investigate and resolve the problem, please include the following information:
- Obsidian version (found in
Settings > General, top of the page) - Plugin version (found in
Settings > Community plugins, listed next to "Custom Note Width") - Theme name you are using (found in
Settings > Appearance > Themes) - Operating system (Windows / macOS / Linux)
- Open the Developer Console in Obsidian:
- Windows/Linux:
Ctrl + Shift + I - macOS:
Cmd + Option + I
- Windows/Linux:
- Click the Console tab
- Look for any red error messages that mention
custom-note-width - Copy and paste any relevant errors into your issue report
- What did you expect to happen?
- What actually happened?
- Step-by-step reproduction: Describe exactly what you did, step by step, so the issue can be reproduced.
- How often does it occur? (Always / Sometimes / Only once)
- Are you using "Readable line length"? (
Settings > Editor > Readable line length)
- Screenshots help me see what you see. Please include them whenever possible.
- Short screen recordings (e.g., via LICEcap, ShareX, or the built-in screen recorder on your OS) are even better, especially for visual glitches or issues that involve interactions (switching tabs, dragging sliders, etc.).
Reports that only say "it doesn't work" without any details cannot be investigated. The more information you provide, the faster I can help.
This plugin is licensed under the MIT License. See the LICENSE file for more information. Please note that this plugin is provided as-is without any warranty. Use it at your own risk.
This plugin is offered completely free of charge!
If you fancy buying me a coffee to fuel more creations like this plugin, you have the option to do so by clicking the button below.
