IcyCat220 downloadsHide, reorder and promote context menu entries, and copy absolute file paths from the file explorer.
Menu Hider works on the menu itself, not on commands. It reads the entries of whatever context menu you open — including ones no command registers, in menus other plugins never touch — so it can hide, reorder, and lift them out of submenus.
Ctrl/Cmd+C to copy their absolute paths to the clipboard.The refresh button re-collects a menu without leaving settings; for menus that can't be synthesized (multi-file selection, URL menus) right-click the real element instead.
Obsidian exposes no API for reading or filtering the entries of a context menu,
so the plugin wraps Menu.prototype.showAtPosition — the single method every
Menu.show* path ends in. Wrapping it lets the plugin read the entries just
before the menu is measured and painted, which is what makes hiding flicker-free
and keyboard navigation correct.
Consequences worth knowing:
try/catch, so a failure inside the plugin logs to
the console and lets the original method run untouched.showAtPosition is not part of the public API. If Obsidian changes it, menus
keep working and the plugin simply stops trimming them.Entries are matched by their visible title, so a menu entry that changes its label (localization, a plugin update) needs to be hidden again.
Commander can hide menu entries too, and if that's all you need it's the safer bet — it does a dozen other things and it's what most vaults already have installed.
The difference is what each plugin can see. Commander matches registered
commands in two hardcoded scopes (editor-menu and file-menu); entries that
aren't commands, and every other menu, are out of its reach. Menu Hider reads
the menu that actually opened, whatever it is.
| Commander | Menu Hider | |
|---|---|---|
| Menus covered | editor + file, hardcoded | any menu, discovered on right-click |
| Granularity | one list per scope | per menu |
| Matching | exact / regex | exact title |
| Reordering | its own commands | any entry |
| Promote out of a submenu | — | yes |
| Native menus | supported | hiding only (see below) |
With Appearance → Native menus enabled, context menus are drawn by the OS and there is no menu DOM to work with. Hiding still applies — entries are dropped before the menu is built — but reordering and promotion don't, because both need the rendered menu. Turn native menus off to use them.
Manual — download main.js, manifest.json and styles.css from the
latest release
into <vault>/.obsidian/plugins/menu-hider/, then enable the plugin in
Settings → Community plugins.
npm install
npm run dev # watch build
npm run build # type-check + production bundle
npm run lint
Desktop only: absolute paths require a filesystem vault.