New plugin: edit todo.txt files in obsidian

Features

  • @context is treated as #tags. You can ctrl click on them.
  • +Project are treated at [[Project]]. You can ctrl click them.
  • _ in +Projects to represent spaces. Ex +Hello_World
11 Likes

This could turn out useful, thanks for starting it. I especially like the idea of @context tags and +project links.

Am I assuming right that it currently is only basic manual editing, so I’d have to mark finished tasks (x YYYY-MM-DD) myself, and handle rec:, rec:+, due: and t: elsewhere (like in Todour which I currently use)?

Is it possible to have the todo.txt file outside the vault?

Thanks! I’d love to expand it to include more features I just not sure where to go next. I was going to start using it day to day and see if anything popped out.

That’s correct. If its useful I could build a view that has checkboxes that handles some of this. Or add a hotkey that “dones” the current line. What do you think would be useful here?

Hmm. I don’t know how to open a file in obsidian that is outside the vault. Maybe symlink it into the vault?

Good question. Personally, I use Todour on Linux and Markor on Android to handle all this. Maybe let’s ask others what they’d like in Obsidian.

Thinking about it, I’d probably want to use “Done” most, and maybe a method to clear out todo.txt by moving the “done” items into done.txt (as Todour does). Problem with done.txt would be accessing it, to get Obsidian links to what was done … Hmm.

That’s a good idea. I already use a symlink for my shopping list, so it gets sync’ed to my smartphone.


As I mentioned somewhere else, there are even JS implementations for handling todo.txt, if you need some inspiration:

This is awesome, thank you for doing this, would be great to have a pane that lets us have this open all the time and also sort, filter etc…

1 Like

Hey, when I activate to detect all filetypes and click on the .txt file, it opens in the standard application. When I rename it to todo.md, the plugin also doesn’t work. Maybe I’m doing something wrong? Thanks for any help! :slight_smile:

@phlind Very strange I dont even have that option checked. The plugin assumes the extension is .txt. Is it possible you have a different plugin enabled competing for the .txt extension like obsidian-releases/community-plugins.json at master · obsidianmd/obsidian-releases · GitHub

@trashhalo Thanks, it works now. I had to deactivate the option to detect all filetypes. They don’t seem to work together.

Ill put a call-out in the readme!! thank you

At the moment it doesn’t recognize projects like +Project-Name right? Would it be possible to make that work?

Quick tip for those using the vim mode: You can select all lines and type :sort to sort for priority. :wink:

Edit: Cmd-clicking +Projects doesn’t work for me on macOs.

At the moment it doesn’t recognize projects like +Project-Name right? Would it be possible to make that work?

yep easy peasy. will do tonight

Edit: Cmd-clicking +Projects doesn’t work for me on macOs.

Do you want that to work? I can do that to. right now its ctrl click

First of all, thank you very much for this.

I am testing it but seems like ctrl+click is not working.

I am using obsidian 0.12.10 and windows.

Thanks for this useful plugin. I’ve been testing it out as I transition my tasks to the todo.txt paradigm. I’m attempting the cmd+click +project or @context but the only thing that happens is the search panel appears with no results (despite having items tagged with them). What is supposed to happen?

@trashhalo

hi, sorry i hear the addon becomes obsolete due to obsidian update,

could I suggest you to write a 1 function alternative plugin instead?

for .todo.txt, we can rename it as .todo.md;
which could be open by obsidian, markor and simpletask (all android)

obsidian will open it as .md i.e. text only …
HOWEVER, you can manually ADD EMPTY lineS to make each entry as a text block,
in this way you can use obsidian to hyperlink to and from the blocks.

markor could open .todo.md (force as .todo.txt by file-> file format); and use as .todo.txt way;
HOWEVER, when one do sorting in markor, it removes all empty lines between the entries, this is the biggest problem. this removed the textblock structure and thus removed obsidian’s ability to hyperlink to/from text blocks (you can manually search but not what i want).

luckily, there is simpletask, it DOESNOT remove empty lines! no matter how you sort, the files is not sort-ed, only what in the memory sort. change however are still added to the file e.g. add Cat, add context etc.

so:

i would like to have an obsidian plug in , that when obsidian read .todo.md files,
it will automatically convert all entries into text blocks: i.e. all entries separated by an empty line before AND after.

use case:
use simpletask for daily .todo.txt, you can even sort by several factors.

then, sometimes use the markor to open the .todo.md;
sort by priority (or entry name, as you wish) and write to the file.

then, we can use obsidian to open the .todo.md (markor is sometimes needed because
entries in simpletask are usually not sorted, you could get random priority, random entry names etc. making you open it in obsidian but cant easily find your entry).

when we open it /w obsidian, we can then add/hyperlinks to the text blocks etc.

i knew some C and python but seems not updated for this.

thanks