Check and uncheck all checkboxes

I’ve been making list templates, and being able to click a button (or hotkey?) to uncheck all checkboxes would be nice to be able to start fresh if I want to reuse a list; rather than having to copy and make a new list each time if there’s no need to. Maybe this would be a plugin?

17 Likes

How do you make a template? I look at what is written in the help section and it makes no sense to me. Step-by-step instructions would help of you have the time.

I just make a note that I name as the template (e.g. Packing list template) and star it for reference, and copy paste it when I want to use it

Came here to suggest the same. I have several check lists that I use more than once.

I would also like to have this feature. My current workaround is to do a find and replace of all instances of [x] with [ ]. It only takes a few seconds, but it would be ideal if this could be fewer clicks and keystrokes. In a broader sense, it may be nice to eventually have macro capability that could do this and other regular tasks within notes much more quickly.

3 Likes

I just learned that there is a new command “Toggle completed” (Ctrl-Enter) in 0.9.5 that can be used here: You can mark the whole checklist (Ctrl-A) or parts of the checklist and then press Ctrl-Enter. However, this does not achieve our goal with a partially completed checklist since it toggles all checkboxes, it does not (re)set them. It also only works in edit mode. A “check/uncheck all” command would also make sense in preview mode.

2 Likes

It seems to me that currently, version(0.12.4) does not have this function, Does anybody know how going on? Thank for any feedback on this.

I came up with a very hacky workaround that seems to clear all checkboxes:

  1. Get yourself espanso - it’s useful for a lot of other things.
  2. Enable Vim by going to Obsidian settings → Editor → Vim key bindings.
  3. Open your default.yml file in your espanso folder, and add the following lines:
  # Super hacky way to clear checkboxes in Obsidian
  - trigger: ":cc"
    replace: ":%s/\\[x\\]/[ ]/g"
  1. In Obsidian, simply type :cc followed by enter, and all checkboxes get cleared.

I’ve been struggling this for months, and am glad to have finally found a solution.

Also: if anyone can tell me why this leaves you in visual mode (rather than normal mode) I’d be curious to find out.

I think this was all possible with the shortcut that Cito mentioned. You select all lines with checkboxes you want to reset, press [Ctrl]+[Enter] once → all the boxes are checked. Press [Ctrl]+[Enter] a second time → all the selected checkboxes are empty again.

@Gnuelp, yes, it seems something changes. It does not seem to toggle individual checkboxes any more in live preview (if the list is in mixed state), but toggles the state of all checkboxes at once between set and unset. This is usually what you want.

However, it still does not work if the selection contains lines without checkboxes. Then the lines with checkboxes will be converted to bullet points and the other lines to checkboxes.

1 Like

I noticed that there is a new Reset Checkboxes Plugin which could solve the problem. Haven’t checked it out yet, since it’s still under review.

1 Like

This worked really well. Thanks!

Did you succeed? Is there any way to uncheck all checkboxes by single click or hotkey? If yes, please let me know.