MH Explorer Utils

unlisted

by MH - Matheus Heidemann

Quality-of-life utilities for the Obsidian file explorer, including sidebar autohide, folder counts, sizes, extensions, pinned folders, hidden folders, and vault stats.

Updated 2mo ago
View on GitHub

MH Explorer Utils

Summary

MH Explorer Utils is an Obsidian plugin that adds quality-of-life utilities to the file explorer and a small vault statistics embed for notes.

The plugin is built from TypeScript source in src/. The installable main.js file is generated by esbuild and should not be edited manually.

Purpose And Features

  • Sidebar autohide for the left and right sidebars, with per-side pin buttons.
  • Folder item counts in the file explorer.
  • File size labels for files and optional recursive folder sizes.
  • File extension labels with configurable formatting.
  • Pinned folders that stay at the top of the file explorer.
  • Hidden folders that can be temporarily shown again.
  • Folder context menu actions for pinning and hiding folders.
  • Commands for toggling sidebar pins, showing hidden folders, and moving to the beginning/end or next/previous note.
  • mh-vault-stats code block that displays total files and vault age.
  • Locales for English (en-us) and Brazilian Portuguese (pt-br).

How It Works / How To Use

Enable the plugin and open its settings tab. The settings UI uses the external MH-API-TEMPORARY plugin API (window.MhApiTemporary) for grouped controls; if that API is unavailable, the settings tab shows a dependency message, while the plugin code still loads.

Use the file explorer folder context menu to pin/unpin folders or hide/unhide folders. Pinned folders are sorted above normal folders. Hidden folders are removed from the explorer unless "Show Hidden Folders" is enabled.

Available settings:

  • Language: en-us or pt-br.
  • Sidebar Autohide: enable autohide independently for left and right sidebars.
  • Folder Item Count: count files, folders, files and folders separately, or total items; optionally count recursively; optionally cache results.
  • Folder Count Format: [12], 12, (12 items), or 12 items.
  • File/Folder Size: show sizes for files, folders, or both; optionally cache folder sizes.
  • File Size Format: 1.2 KB, [1.2 KB], or (1.2 KB).
  • File Extension Format: md, [md], or (md).
  • Pinned Folder Indicator: icon, accent color, or both.
  • Hidden Folders: show hidden folders temporarily or clear the hidden list.

No note frontmatter is required. The vault stats embed uses code block options instead:

```mh-vault-stats
paths: Notes, Projects
vault-date: 2025-09-18
accent-color: #39d353
```

Code block options:

  • paths: optional comma-separated folder paths. Omit it or use / for the whole vault.
  • vault-date: optional YYYY-MM-DD date. If omitted, the plugin tries to read the vault root creation time.
  • accent-color: optional CSS color for the stat numbers.

Commands registered by the plugin:

  • Toggle Pin Left Sidebar.
  • Toggle Pin Right Sidebar.
  • Toggle Hidden Folders Visibility.
  • Go to Beginning of Note.
  • Go to End of Note.
  • Go to Next Note in Folder.
  • Go to Previous Note in Folder.

Installation

For a manual Obsidian installation, copy these files into:

<vault>/.obsidian/plugins/mh-explorer-utils/

Required install files:

  • main.js
  • manifest.json
  • versions.json
  • locales/en-us.json
  • locales/pt-br.json

Then enable "MH Explorer Utils" in Obsidian's Community Plugins settings.

Development

Install dependencies:

npm install

Run type checking:

npm run typecheck

Build the production bundle:

npm run build

Watch and rebuild during development:

npm run dev

Validate the generated bundle syntax:

node --check main.js

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.