No description
Find a file
2025-06-24 20:03:03 -07:00
.editorconfig Initial commit 2025-04-07 20:48:26 -07:00
.eslintignore Initial commit 2025-04-07 20:48:26 -07:00
.eslintrc Initial commit 2025-04-07 20:48:26 -07:00
.gitignore copy changes to template 2025-04-07 21:23:08 -07:00
.npmrc Initial commit 2025-04-07 20:48:26 -07:00
esbuild.config.mjs Initial commit 2025-04-07 20:48:26 -07:00
LICENSE update docs and license 2025-04-07 21:46:19 -07:00
main.ts format code 2025-06-24 19:58:10 -07:00
manifest.json address pr feedback 2025-05-02 23:41:49 -07:00
package-lock.json copy changes to template 2025-04-07 21:23:08 -07:00
package.json copy changes to template 2025-04-07 21:23:08 -07:00
README.md address pr feedback 2025-05-02 23:41:49 -07:00
shell.nix copy changes to template 2025-04-07 21:23:08 -07:00
tsconfig.json Initial commit 2025-04-07 20:48:26 -07:00
version-bump.mjs Initial commit 2025-04-07 20:48:26 -07:00
versions.json bump version 2025-06-24 20:03:03 -07:00

Checkbox Sorter 🔄

Automatically moves completed checkboxes to the bottom of their list group when toggled. Preserves nested list structure while sorting.

Basic Example ▶️

Click any checkbox to toggle it and watch it sink to the bottom of its peer group:

- [ ] Buy milk  <-- Click this checkbox
- [ ] Get gas
- [x] Bread     (already completed)

Becomes after clicking:

- [ ] Get gas    ← Unticked stays on top
- [x] Buy milk   ← Newly completed moves here
- [x] Bread      ← Existing completed items

Features

  • Three-level configuration (global/file/list-marker)
  • Nested list support - child items stay with parents
  • Smart grouping - only affects peers at same indentation
  • Multi-list handling - works with multiple lists in one file

Installation ⬇️

  1. Open Obsidian → Settings → Community plugins
  2. Click "Browse" and search "Obsidian Checkbox Sort"
  3. Install and enable plugin
  4. (Optional) Configure default behavior in plugin settings

Usage 🛠️

Configuration Hierarchy (Lowest to Highest):

  1. Global Setting
  2. File Frontmatter (checkbox-sort: [true|false])
  3. List Marker (%%checkbox-sort: [true|false]%%)

Global Setting (enabled by default):

- [ ] Buy milk   <-- Click toggles and sorts
- [ ] Get gas

File Frontmatter (add to YAML frontmatter):

---
checkbox-sort: false  # Disable for this file
---

List Marker Override:

%%checkbox-sort: false%%  <-- Disables sorting for next list
- [ ] Task 1
- [ ] Task 2

%%checkbox-sort: true%%  <-- Enables sorting for this list
- [ ] Task A
- [ ] Task B

Nested List Example:

- [ ] Parent 1
  - [ ] Child 1
  - [ ] Child 2  <-- Click this checkbox
  - [ ] Child 3
- [ ] Parent 2

Becomes after clicking:

- [ ] Parent 1
  - [ ] Child 1
  - [ ] Child 3
  - [x] Child 2  <-- Completed moves here
- [ ] Parent 2

How It Works 🔧

  1. Clicking a checkbox:
    • Toggles task state
    • Finds all peer items at same indentation level
    • Groups unticked items first (sorted as-is), then ticked items
    • Preserves nested list structure under each item

Troubleshooting ⚠️

Sorting not working?
→ Verify no conflicting list markers exist above
→ Check frontmatter isn't overriding global settings
→ Ensure marker comments are directly above list

New file issues?
→ Save file first for frontmatter settings to take effect