The Min Width plugin sets the minimum width for the active pane. Obsidian will auto resize the active pane to ensure it is wider enough and shrink other panes accordingly.
This plugin is based on the blog post Set the Minimum Width of the Active Pane in Obsidian.
Install the plugin by searching "Min Width" in the community plugins. Or manually copy over main.js
, manifest.json
in the release to the folder .obsidian/plugins/obsidian-min-width/
in your vault.
The default settings set the minimum width to either 40 columns or 88% of the whole editing area, depending on which is smaller. The settings tab also supports overriding the minimum width for different view types. Following is a list of some known view types:
markdown
: The markdown editorexcalidraw
: The view type used by plugin Excalidraw and Excalibrain.
This project uses Typescript to provide type checking and documentation. The repo depends on the latest plugin API (obsidian.d.ts) in Typescript Definition format, which contains TSDoc comments describing what it does.
Note: The Obsidian API is still in early alpha and is subject to change at any time!
- Update your
manifest.json
with your new version number, such as1.0.1
, and the minimum Obsidian version required for your latest release. - Update your
versions.json
file with"new-plugin-version": "minimum-obsidian-version"
so older versions of Obsidian can download an older version of your plugin that's compatible. - Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix
v
. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases - Upload the files
manifest.json
,main.js
as binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release. - Publish the release.
You can simplify the version bump process by running
npm version patch
,npm version minor
ornpm version major
after updatingminAppVersion
manually inmanifest.json
. The command will bump version inmanifest.json
andpackage.json
, and add the entry for the new version toversions.json
- Clone this repo into your vault as
VaultFolder/.obsidian/plugins/obsidian-min-width
. npm i
oryarn
to install dependenciesnpm run dev
to start compilation in watch mode.
- ESLint is a tool that analyzes your code to quickly find problems. You can run ESLint against your plugin to find common bugs and ways to improve your code.
- To use eslint with this project, make sure to install eslint from terminal:
npm install -g eslint
- To use eslint to analyze this project use this command:
eslint main.ts
- eslint will then create a report with suggestions for code improvement by file and line number.
- If your source code is in a folder, such as
src
, you can use eslint with this command to analyze all files in that folder:eslint .\src\