README file from
GithubpaperWeight
Keeps your folded headings completely folded, even after copy/paste or indenting.
The problem
Obsidian unfolds everything when you paste text, and re-indenting a folded section can knock its fold state loose. If you rely on folded headings to keep long notes organized, this gets annoying fast.
Features
Paste preserves folds: Copy a folded section and paste it elsewhere (even in a different note): its folded parts stay folded, instead of Obsidian automatically unfolding everything on paste.
Toggle fold for everything in a selection: Select a range of text and run "Toggle fold for everything in selection" from the command palette to fold or unfold every heading, list item, code block, or callout inside it in one go. The toggle is configurable to any keybind.
Indent-safe folding: Tab / Shift-Tab to indent or outdent text no longer disrupts existing folds in the document.
Installation
From Obsidian
- Open Settings → Community plugins
- Click Browse and search for "paperWeight"
- Click Install, then Enable
Manual installation
- Download
main.js,manifest.json, andstyles.css(if present) from the latest release - Create a folder
paperWeightinside your vault's.obsidian/plugins/directory - Copy the downloaded files into that folder
- Reload Obsidian and enable PaperWeight under Settings → Community plugins
Usage
- Copy/paste: works automatically, no setup needed.
- Toggle fold in selection: select text, then run the command from the
command palette (
Ctrl/Cmd + P), or select keybind in settings. - Indent-safe folding: works automatically on load, no setup needed.
Known limitations
- Multi-cursor copy (multiple simultaneous selections) does not currently preserve fold state: copy/paste will still work normally, folds just won't be restored in that case.
Support
Found a bug or have a feature request? Please open an issue.