Split Groups

by Fuad Laguda
5
4
3
2
1
Score: 51/100

Description

The Split Groups plugin adds a custom Bases view that places a note in every group named by its list property rather than combining multiple values into one group. It supports Table and List layouts, with an optional second property for nested splitting. Values are matched without case or surrounding space differences, links resolve by their target and duplicate values count once. Empty properties can appear in a final no value group. Groups support alphabetical or note count sorting, natural number order and persistent folding, while notes retain the Base's own sort. Heading controls create notes with the relevant group values, collapse or expand every group and preserve separate fold states for each view. Disabling the plugin leaves notes unchanged but Split groups views remain unavailable until the plugin is restored or changed to Table.

Reviews

No reviews yet.

Stats

3
stars
2,929
downloads
2
forks
52
days
37
days
37
days
1
total PRs
0
open PRs
0
closed PRs
1
merged PRs
1
total issues
0
open issues
1
closed issues
27
commits

Latest Version

a month ago

Changelog

Split by tags: with Split by set to file.tags, the + on a tag group and a drop in Kanban now write to the note's tags property (a tag typed in the note's text stays, and a message says so). Folder for new notes: a new view option; the + makes the note there and opens it. Needs Obsidian 1.10.2 or later.

README file from

Github

Split Groups

A view for Obsidian Bases that puts a note in every group its list property names.

Group a Base by a list property today and a recipe with category: [main, side] lands in one combined group called "main, side". With Split Groups it appears under main and again under side, which is what most people expect. This is the behaviour asked for in the forum thread Make a note fall into multiple groups.

Obsidian's own grouping puts Jollof Rice in one "main side" group. Split Groups shows it under main and again under side, then splits each group again by diet, folds a group, and collapses and expands them all

Use it

  1. Open a Base, open the view menu and add a view of type Split groups.
  2. In the view options, set Split by to the list property to group on.
  3. Pick Table, List, Cards or Kanban under Layout. Columns come from the view's properties, as in any Base.
  4. Optional: set Then split by to a second list property, and every group splits again inside (for example Genre, then Status).
  5. Optional: pick a note under Template for new notes, and new notes made in this view (with a group's + or the toolbar's New) start from it.

How values are grouped

  • Every item in a list gets its own group. A single value works too.
  • Main, main and main are one group, shown with the spelling seen first.
  • Links group by the note they point to: [[Main]], [[Recipes/Main.md]], [[Main|Main dish]] and plain main share a group.
  • A tag's leading # is dropped. Split by file.tags and a note shows under each of its tags, from its properties and its text alike.
  • The same value twice in one note counts once.
  • Notes with nothing in the property go to (no value) at the end. Turn that off with Show notes with no value.
  • Groups sort by name, numbers naturally (2 before 10). Notes inside a group keep the Base's own sort.
  • Sort groups in the view options: A → Z, Z → A, Most notes first or Fewest notes first (ties go by name). (no value) stays last either way.
  • Click a group's heading to fold it. Folded groups stay folded when notes change, and each view remembers its own. Collapse all and Expand all sit above the groups.
  • The + on a heading makes a new note with that group's value filled in. On a sub-group it fills in both values. With a template chosen, the note is made from it (see below).
  • Until a property is chosen under Split by, the view shows all its notes in one list.
  • Obsidian's own Group by (under Sort) has no effect on a Split groups view. Use Split by instead.

If you turn the plugin off, Split groups views show "Unknown view type" until you turn it back on or switch that view to Table. Your notes are never changed, except by a drop in the Kanban layout, which changes only the split property of the note you dropped.

Cards and Kanban

Cards shows every group as a grid of cards. Pick a property under Image property and a card shows that note's image at the top: a link or path to a file in the vault, or a web address.

Kanban puts every group in its own column, side by side, with the same cards stacked inside. Drag a card to another column and the note's list property changes:

  • Moves it (the default): the column it came from is swapped for the one it landed on. [main, side] dragged from main to dessert becomes [side, dessert].
  • Adds that group's value, keeps the others: [main, side] becomes [main, side, dessert].
  • Leaves only that group's value: [main, side] becomes [dessert].

Choose which under Dropping a card on a group in the view options. Dropping on (no value) takes the value away (or clears the property in the last mode). A short press on a card still opens the note; only a press that moves starts a drag. Cards can be dragged when Split by is a note property or file.tags, since other file properties and formulas cannot be written. Tags are written to the note's tags property; a tag typed in the note's text cannot be taken out by a drop, so the note stays in that column too, and a message says so. Then split by is not used in Kanban. On a phone, drag a card sideways; up and down still scrolls.

Click a note to open it, Ctrl or Cmd click (or middle click) for a new tab, and Ctrl or Cmd hover for a preview.

New notes from a template

Template for new notes set to Templates/Recipe.md, then the + under main and meat makes a note with category main, diet meat and the template's time, cooked and headings

Pick a note under Template for new notes in the view options. The + on a group heading then makes the new note from that template, with the group's value filled in. The toolbar's New in that view uses the same template, without a group value. This is the ask in the forum thread Bases: New With Template, for Split groups views.

  • The template's properties are added to the note. For the property you split by, the group wins: a template with category: [uncategorised] under main gives category: [main]. Values the Base fills in from its filters are kept.
  • The template's body goes in under the properties. {{title}}, {{date}} and {{time}} are filled in like Obsidian's own Templates, and so are {{date:FORMAT}} and {{time:FORMAT}}.
  • If the template uses Templater (<% %>) and Templater is installed, Templater fills it in.
  • Each view has its own template, so one Base can have a different one per view.
  • Pick a folder under Folder for new notes and the + makes the note there, as "Untitled", and opens it. With nothing chosen the base decides, as before.
  • Only Split groups views use the template. New in a Table, Cards or List view is not changed.
  • If the template note has been moved or deleted, the note is made blank and a message says so.

Try it

test-vault is a small vault with recipes and edge cases (links, case, duplicates, empty lists, numbers). Open it in Obsidian, build the plugin, and open Recipes.base or Edge.base. The Category then diet view uses Templates/Recipe.md for its +. npm run bulk adds 3,000 generated notes and Bulk.base for a speed check.

Build

npm install
npm run build   # type checks, bundles main.js, copies it into test-vault
npm test        # unit tests for the grouping rules

Licence

MIT, Fuad Laguda.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
List Callouts
4 years ago by mgmeyers
Create callouts in lists in Obsidian.
Custom File Extensions and Types
4 years ago by MeepTech
An obsidian plugin allowing you to register and view different file extensions in a modular manner.
Consecutive Lists
3 years ago by Josh Tucker
Share my plugin list
3 years ago by Benature
Share the obsidian plugins that is using currently
List Outline Helper
3 years ago by triangular-sneaky
Obsidian plugin to select the current outline
Zoom
5 years ago by Viacheslav Slinko
Automatic Renumbering
2 years ago by Omri Levi
Automatically reorders checklists and numbered lists as you edit them.
Time Bullet
2 years ago by pedrogdn
Auto Bullet
2 years ago by takitsuba
Table List
a year ago by Akaswan
Alpha Bullet
a year ago by Mara-Li
Obsidian plugin that sorts bulleted lists alphabetically.
Yandex Tracker Issue
a year ago by Pavel Sokolov
Maps
a year ago by Obsidian
Map layout for Obsidian Bases. Display your notes as an interactive map view.
List to table converter
a year ago by paddomanno
Kanban Bases View
8 months ago by I. Welch Canavan
A kanban-style drag-and-drop custom view for Obsidian Bases that allows you to organize your notes into columns based on any property.
Calendar Bases
8 months ago by Edrick Leong
Feed Bases
6 months ago by edrickleong
Bases Charts
6 months ago by Moritz Jung
Base Board
6 months ago by mderazon
Kanban Plugin For Obsidian
TaskNotes
5 months ago by callumalpass
Task and time-tracking management with calendar integration for Obsidian
Bases Paginator
4 months ago by sean2077
A plugin for Obsidian that adds a paginated table view with column filtering capabilities to Obsidian Bases.
Bases Toolbox
4 months ago by Grub Basket
Adds Quality of Life features to Obsidian Bases
Power Bases
3 months ago by Power Plugins
Add board, calendar, timeline, chart, gallery, and table views to Bases, with inline editing, colors, rollups, field types, formulas, and CSV import.
Canvas Bases
3 months ago by callumalpass
Canvas-style layouts and JSON Canvas materialization for Obsidian Bases.
Link Structure
3 months ago by Dmitry Fert
Obsidian plugin that adds a Structure view for Bases, displaying notes as a hierarchical tree based on the up property. Supports drag-and-drop reorganization with automatic link updates, multi-select, and Templater integration.
Trade Rythm
2 months ago by iblameaza
Trade Rythm - Obsidian trading journal plugin
Base Source Editor
2 months ago by fronglemog
Edit the YAML source of a Base without leaving Obsidian.
Bases Timeline View
2 months ago by xjiaxiang
timeline view for obsidian bases
Home Cards
a month ago by ttangents
Give your vault a homepage: a start page or dashboard of note cards from recent notes, properties, tags, links and Bases, with pins, project boards and pages for any folder or tag.
Cool Bases
a month ago by pattgue
Design cool card views for Obsidian Bases.
Masonry
a month ago by Mario Miletta
A visual masonry browser for Obsidian notes and filtered Bases.
Horizon
a month ago by Mario Miletta
Horizon — calendar for your Obsidian vault: daily and periodic notes, tasks, and dated notes in one place.
Note Player
24 days ago by xia-ataraxia
Obsidian plugin that plays note-backed playlists with YouTube (via yt-dlp), cached audio, and local files.
Just Simple Planner
19 days ago by David Hurt
A local visual planner for Obsidian: Markdown notes on a continuous timeline, connected threads, compact previews, tasks and notebook view.