Auto add incremented block id suffixes to lines

Use case or problem

I have recently gotten in the habit of preemptively adding block ids to lines. For example, one use case is having these refer to source page numbers in the form ^112-2 for the second item sourced from page 112. It isn’t too difficult to add these manually, but in cases where you are doing this for a high percentage of the pages, it feels like the process invites some automation.

Proposed solution

If there were a plugin or even native formatting feature that would, when toggled on, cause the pressing of Enter to create a new line in the correct formatting (whether block quote, bullet, or numbered list) with the number block id number incremented. For example, the next line after one with an id of ^112-2 would be ^112-3. This would be added as a suffix thus the cursor would immediately be placed one space before the block id.

As a useful bonus, there would also be hotkeys to increment the block id page and count number up and down by increments of 1 and 10. This increment and decrement would consequently leave just the block id value selected. So if you were on a line without an id, you could simply hit the increment hotkey and then manually type the number if desired.


1 Like