Git Product home page Git Product logo

todotxt-mode's Introduction

todotxt-mode README

"todotxt-mode" is an extension for working with todo.txt formatted files. It includes formatting of the different task "axes": priority, project and context, as well as a number of commands for automating and simplifying useful tasks and common workflows.

This extension was inspired by the todo-txt VS Code extension and borrows some ideas and features from it, but takes it in a direction to make it easier to implement a GTD-like process using todo.txt-formatted files.

Features

Highlighting

The extension uses decorators to highlight tags of task items.

  • Syntax highlighting of task priority ((A)), context (@label) and project (+label) tags
  • Priority format can vary among A, B and C-Z levels
  • Syntax higlighting of metadata tags (key:value1)
  • Additional formatting for due:YYYY-MM-DD date for past, present and future dates

Highligted Tasks

Task Management

Commands that help manage the task list include

  • Mark tasks as complete
  • Sort tasks by project, priority, context, due date or metadata tag
  • Stable sort so task without the sort key are not effected
  • Reformat task tags to a consistent sequence

Manage Tsks

File Workflow Commands

There are a number of commands in the extension to support a GTD-like workflow.

  • Move tasks from any file to the main Todo file (used when processing the Inbox file)
  • Move tasks to the Waiting file
  • Move tasks to the Deferred file
  • Move completed tasks to the Archive file

Manage Tsks

Todo.txt enhancements

The extension also includes a few enhancements that, while not part of the todo.txt spec, can be useful.

  • Optional delimiter to break file into tasks section and notes section
  • Save selection to a note and add to a task as a note:<file> metadata tag, with preview

Create Note Preview Note

  • Highlight a section of a Markdown file that contains tasks

Markdown Highlighting

Extension Settings

Commands

Command Description
todotxt-mode.toggleCompletion Toggle a task as complete
todotxt-mode.sortByContext Sort all/selected tasks by context - @label
todotxt-mode.sortByPriority Sort all/selected tasks by priority - (A)
todotxt-mode.sortByProject Sort all/selected tasks by project - +label
todotxt-mode.sortByTag Sort all/selected tasks by metadata tag - key:value
todotxt-mode.sortByDueDate Sort all/selected tasks by due date - due:YYYY-MM-DD
todotxt-mode.formatTasks Format tasks with all tags in consistent order at end of the line
todotxt-mode.archiveTasks Move completed tasks to the Done file
todotxt-mode.moveTasksToTodo Move selected tasks to the Todo file
todotxt-mode.moveTasksToWaiting Move selected tasks to the Waiting file
todotxt-mode.moveTasksToSomeday Move selected tasks to the Deferred file
todotxt-mode.moveTasksToProject Move selected tasks to a Markdown project file
todotxt-mode.createTaskNote Create a Markdown note file from the selected note text
todotxt-mode.removePriorities Remove all priorities from tasks

Styles

Setting Description Default
todotxtmode.contextStyle.light.color Color of context field in light mode rgb(40, 161, 86)
todotxtmode.contextStyle.dark.color Color of context field in dark mode rgb(40, 161, 86)
todotxtmode.highPriorityStyle.light.color Color of context field in light mode rgb(240, 226, 25)
todotxtmode.highPriorityStyle.dark.color Color of context field in dark mode rgb(240, 226, 25)
todotxtmode.mediumPriorityStyle.light.color Color of context field in light mode rgb(201, 189, 22)
todotxtmode.mediumPriorityStyle.dark.color Color of context field in dark mode rgb(201, 189, 22)
todotxtmode.lowPriorityStyle.light.color Color of context field in light mode rgb(170, 160, 21)
todotxtmode.lowPriorityStyle.dark.color Color of context field in dark mode rgb(170, 160, 21)
todotxtmode.projectStyle.light.color Color of context field in light mode rgb(25, 172, 230)
todotxtmode.projectStyle.dark.color Color of context field in dark mode rgb(25, 172, 230)
todotxtmode.tagStyle.light.color Color of context field in light mode rgb(179, 58, 172)
todotxtmode.tagStyle.dark.color Color of context field in dark mode rgb(179, 58, 172)
todotxtmode.pastDateStyle.light.color Color of context field in light mode rgb(177, 58, 28)
todotxtmode.pastDateStyle.dark.color Color of context field in dark mode rgb(177, 58, 28)
todotxtmode.presentDateStyle.light.color Color of context field in light mode rgb(219, 216, 26)
todotxtmode.presentDateStyle.dark.color Color of context field in dark mode rgb(219, 216, 26)
todotxtmode.futureDateStyle.light.color Color of context field in light mode rgb(118, 194, 31)
todotxtmode.futureDateStyle.dark.color Color of context field in dark mode rgb(118, 194, 31)
todotxtmode.completedStyle.textDecoration Text decoration for completed tasks line-through
todotxtmode.completedStyle.opacity Opacity for completed tasks 0.5

Files

There are a few special files identifed for certain commands

Setting Description Default
todotxtmode.todoFilename Name of main todo text file todo.txt
todotxtmode.doneFilename Name of archive file for completed tasks done.txt
todotxtmode.somedayFilename Name of file for someday/maybe tasks someday.txt
todotxtmode.waitingFilename Name of file for deferred/waiting tasks waiting.txt

Keybindings

The extension ships with only one keybinding assigned but any of the commands can be bound to keyboard shortcuts in the usual manner with VS Code.

Command Default Keybinding
extension.toggleCompletion ctrl+shift+x

Other Settings

The remaining settings define various behavior of the extension including which files should have this extension activate.

Setting Descripiton Default
todotxtmode.sortCompletedTasksToEnd Alwasy place completed tasks at end of list when sorting true
todotxtmode.sectionDelimiterPattern Regex pattern to delimit todo tasks section from other parts of the file ^--$
todotxtmode.todoFilePattern Regex pattern of filenames to apply todotxt-mode commands ^.*\\.txt$
todotxtmode.excludeDecorationsFilePattern Regex pattern of filenames to exclude todotxt-mode decorations ^done\\.txt$
todotxtmode.markdownFilePattern Regex pattern of Markdown filenames to apply todotxt-mode commands using markdownDecorationBeginPattern and markdownDecorationEndPattern `^.*\.(md
todotxtmode.markdownDecorationBeginPattern Regex pattern of rane in Markdown files to decorate ^#+\\s+Tasks\\s*$
todotxtmode.markdownDecorationEndPattern Regex pattern of rane in Markdown files to decorate ^$

Release Notes

See CHANGELOG

Future Plans

  • Move tasks from inbox.txt to to a new or existing Markdown project file
  • Move tasks from a Markdown project file to todo.txt file
  • Collect @next tasks from all project files into todo.txt file
  • More comprehensive style setting support

todotxt-mode's People

Contributors

davraamides avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.