{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicrs3scbw7ykl6m3lx66ve3kiqhkzljvhpba3drtjeioodhsnthbu",
    "uri": "at://did:plc:ircis5cmp6zyi7m3h45h6rfq/app.bsky.feed.post/3mfiewzzqlci2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreihzu7lzm3rv7hnvg5z7qmidwygykxlracgqgcoclraczfq7zsb4re"
    },
    "mimeType": "image/png",
    "size": 106989
  },
  "path": "/2026/02/23/filter-todotxt-in-obsidian-no-plugins",
  "publishedAt": "2026-02-22T13:00:00.000Z",
  "site": "https://ellanew.com",
  "tags": [
    "Recently",
    "todo.txt format",
    "The official todo.txt format",
    "https://github.com/todotxt/todo.txt",
    "Searches",
    "Bookmarks",
    "I’m not the only one",
    "I’m not alone in hoping this will change",
    "folding",
    "freecodecamp",
    "Mozilla",
    "level 3",
    "Explore the official knowledge base",
    "Mastodon",
    "Bluesky",
    "RSS feed",
    "@contexts"
  ],
  "textContent": "Recently I mentioned that all my to-dos get thrown into one text file, in the todo.txt format. It’s incredibly quick to add new tasks. And once you know some simple formatting rules, it’s also easy to see just the tasks you want to see, when you want to see them.\n\nBy the end of this article you will understand how to create, adjust, and reuse saved searches in Obsidian to filter a todo.txt file into useful views, without (additional) plugins. You will also be able to embed these searches anywhere you wish to see them in your files, such as in a daily or weekly note.\n\n## Tracking tasks in Obsidian, todo.txt-style\n\n### What I need the system to do\n\nI want an easy way to capture tasks, and to see subsets of them at specific times. The solution must fit my plain text requirement, which is that **all important information must exist as a text document that can be read by any text editor on any device or platform**.\n\nI want to see tasks when past-me decided I should look at them again. They should fall under the following headings:\n\n  * Today\n  * This week\n  * This month\n  * Later\n\n\n\nThis is what a task list pulled from a todo.txt file can look like in Obsidian:\n\n_Queries are on the left, results on the right_\n\n* * *\n\n### How to structure tasks so it works\n\nThe official todo.txt format is easy to learn. It is also flexible, and can be tailored to your needs.\n\nHere are the basic rules:\n\n_Screenshot from_ https://github.com/todotxt/todo.txt\n\n* * *\n\nMy task mangagement system is centred on _when_ tasks need to be looked at, so I use priorities as follows:\n\n  * `(A)` = Today\n  * `(B)` = This week\n  * `(D)` = This month\n  * `(L)` = Later (L tasks need to be done sometime after this month)\n  * `(Z)` = Maybe. These are the sleeping to-dos; they are ideas for tasks that I don’t want to lose.\n\n\n\nYou can use any letters you like for time categories, as long as alphabetical order = chronological order.\n\nI also add tags to indicate which broad calendar category a task belongs to, and months of the year or days of the week to designate repeating tasks. Tags are useful when time blocking. I use them instead of the todo.txt contexts as they are clickable in Obsidian and @contexts are not. This means I can click on a `#tag` and immediately be taken to all instances of that tag in Obsidian.\n\nAnd that’s it! Start simple. No task will slip through the cracks as long as you do these two essential things:\n\n  1. Add a time code (priority) to the beginning of the task\n  2. Review time categories regularly\n\n\n\n## Obsidian Search guide\n\nSearches in Obsidian can appear in three different locations.\n\n  1. Bookmarks in Obsidian seem handy, but the search terms aren’t editable. If you need to change what you’re looking for you must save the bookmark all over again. I’m not the only one who would like to see this change.\n\n  2. The Search box in the side bar shows the same list as an embedded query, but the search terms are often cut off due to the width of the search box. This makes it harder to see what you’re doing when edits need to be made to the search parameters. Once again, I’m not alone in hoping this will change.\n\n  3. Embedded queries are saved searches that can be viewed inline with whatever other text you have on a page. They can be edited, and can easily be hidden, if needed, by placing them under a header and folding them out of sight.\n\n\n\n\nEmbedded queries are perfect for working with a todo.txt file! I use them extensively as a convenient way to see just the tasks I’m interested in, right there on today’s date.\n\nTo add a query to a page, you will write what you would normally put into the search box, and place that text inside a code block, like this:\n\n\n    ```query\n    file:todo \"(A)\"\n    ```\n\nThat search will find every instance of the text `(A)` in the file named `todo`. _Note: In Obsidian that file would be`todo.md`, not `todo.txt`._\n\n### More complex Obsidian search terms\n\nHere are some more searches, covering most scenarios you’ll face with a file in the todo.txt format, named `todo.md`.\n\nTasks assigned to this week, that have the category of `admin`:\n\n\n    ```query\n    file:todo line:(\"(B)\" \"#admin\")\n    ```\n\nTasks assigned to this month, that do not contain the tags `errand` or `buy`:\n\n\n    ```query\n    file:todo-txt line:(\"(D)\" -(\"#errand\" OR \"#buy\"))\n    ```\n\nTasks assigned to today, in the `admin/work` category, across multiple files in a folder named `TODO`, but excluding the sub folder `Archive`:\n\n\n    ```query\n    path:(TODO -Archive) line:(\"(A)\" \"#admin/work\")\n    ```\n\nTasks assigned to today or this week, that do not yet have a category (tag) assigned — note the grouping of terms within parentheses:\n\n\n    ```query\n    file:todo line:((\"(A)\" OR \"(B)\") -\"#\")\n    ```\n\nAdding RegEx to Obsidian search terms really opens things up! This next search shows tasks from any file in the TODO folder (but not the Admin sub folder) with due/review dates between 2026-02-21 and 2026-03-21. Excludes creation dates, includes any 2026 date beginning with a colon.\n\n\n    ```query\n    path:(TODO -Admin) line:/\\s:2026-(02-(2[1-9])|03-(0[1-9]|1[0-9]|2[01]))/\n    ```\n\nThe Obsidian Help guide to Search recommends the freecodecamp and Mozilla guides to RegEx.\n\n_Declaration in the interests of transparency: I used an AI agent to help me generate the RegEx in the above example. AI isn’t allowed to write words for me, but I’m happy to let it show me things I haven’t learned yet, but can check the accuracy of in the field._\n\n## What to do with completed tasks\n\nCompleted tasks in the todo.txt format have a lower case `x` added to the front. If a task has a creation date, you have the option to add a completion date directly in front of it. You can then either exclude completed tasks from your searches, delete them, or cut and paste them into a dedicated `done` file.\n\nI like using the Todo.txt Mode Obsidian plugin for its customisable syntax highlighting, sorting, and archiving abilities. This plugin sends all completed tasks to the `done` file with a keyboard shortcut.\n\nThere are other todo.txt plugins for Obsidian, but none that appeal to me. You can also use any of the dedicated todo.txt tools out there on your to-dos should you leave Obsidian behind; keeping tasks in plain text means they will never be tied to any one app.\n\n## You made it!\n\nCongratulations! You should now be able to extract just the tasks you want to see from a todo.txt file, in Obsidian.\n\nBut why stick with vanilla Obsidian search? Why not use Dataview, or Obsidian Bases? Because the latter are for querying the properties in structured files, where each piece of information lives in it’s own file; not a messy throw-it-all-in list. With a todo.txt file you are searching for patterns of text, not running a database.\n\nI want to stress that embedded queries (saved searches) in Obsidian are solely for convenience. This is important because my task file would still be just as independently useful if Obsidian were to disappear. I can see what tasks are on my list just as easily in VS Code as I can in Obsidian, minus the convenience of embedded queries.\n\nOne last tip: Make things easier for your future self when writing complex queries in Obsidian, by writing a hidden comment above them to explain what they do. E.g.\n\n\n    <!-- due/review dates between 2026-02-21 and 2026-03-21 -->\n    ```query\n    path:(TODO -Admin) line:/\\s:2026-(02-(2[1-9])|03-(0[1-9]|1[0-9]|2[01]))/\n    ```\n\n* * *\n\n_Important notes:_\n\n  * _Obsidian search terms will not work in any other app, thus placing them squarely onlevel 3 of the plain text productivity scale_\n  * _Obsidian search can do a whole lot more than what is covered here.Explore the official knowledge base_\n  * _There are a lot of Obsidian-free ways to work with todo.txt files, including dedicated apps and CLI tools_\n\n\n\n* * *\n\n_💬 I love to hear from readers! email hello at ellanew dot com or message me on Mastodon or Bluesky. Follow my RSS feed, or sign up to receive posts in your inbox._\n\n\n\nIf you’ve found value here I invite you to share this post with someone you think will appreciate it, or make a contribution to my support jar.",
  "title": "PTPL 196 · How to Filter a todo.txt File in Obsidian — Without Plugins"
}