From 7bb500b25127b210e8273ce62ab73ceabba34e10 Mon Sep 17 00:00:00 2001 From: Markus Schiller Date: Fri, 29 Nov 2024 11:18:24 +0100 Subject: [PATCH 1/3] feat: add review tag --- APlainTasksCommon.py | 1 + Default (Linux).sublime-keymap | 3 ++- Default (OSX).sublime-keymap | 3 ++- Default (Windows).sublime-keymap | 3 ++- PlainTasks.py | 40 +++++++++++++++++++++++++++++ PlainTasks.sublime-completions | 3 ++- PlainTasks.sublime-syntax | 4 +++ tasks.hidden-tmTheme | 43 ++++++++++++++++++++++++++++++++ 8 files changed, 96 insertions(+), 4 deletions(-) diff --git a/APlainTasksCommon.py b/APlainTasksCommon.py index 36eb11b..34db95c 100644 --- a/APlainTasksCommon.py +++ b/APlainTasksCommon.py @@ -28,6 +28,7 @@ def run(self, edit, **kwargs): self.open_tasks_bullet = settings.get('open_tasks_bullet', u'☐') self.done_tasks_bullet = settings.get('done_tasks_bullet', u'✔') self.canc_tasks_bullet = settings.get('cancelled_tasks_bullet', u'✘') + self.review_tasks_bullet = "⚑" self.before_date_space = settings.get('before_date_space', ' ') translate_tabs_to_spaces = settings.get('translate_tabs_to_spaces', False) diff --git a/Default (Linux).sublime-keymap b/Default (Linux).sublime-keymap index a0ed2b6..42700a3 100644 --- a/Default (Linux).sublime-keymap +++ b/Default (Linux).sublime-keymap @@ -31,5 +31,6 @@ [ { "key": "selector", "operator": "equal", "operand": "text.todo meta.tag.todo.completed, text.todo meta.tag.todo.cancelled" } ] - } + }, + { "keys": ["alt+x"], "command": "plain_tasks_toggle_review", "context": [{"key": "selector", "operator": "equal", "operand": "text.todo"}] }, ] diff --git a/Default (OSX).sublime-keymap b/Default (OSX).sublime-keymap index f64549a..dfd1f29 100644 --- a/Default (OSX).sublime-keymap +++ b/Default (OSX).sublime-keymap @@ -31,5 +31,6 @@ [ { "key": "selector", "operator": "equal", "operand": "text.todo meta.tag.todo.completed, text.todo meta.tag.todo.cancelled" } ] - } + }, + { "keys": ["super+x"], "command": "plain_tasks_toggle_review", "context": [{"key": "selector", "operator": "equal", "operand": "text.todo"}] }, ] diff --git a/Default (Windows).sublime-keymap b/Default (Windows).sublime-keymap index a0ed2b6..42700a3 100644 --- a/Default (Windows).sublime-keymap +++ b/Default (Windows).sublime-keymap @@ -31,5 +31,6 @@ [ { "key": "selector", "operator": "equal", "operand": "text.todo meta.tag.todo.completed, text.todo meta.tag.todo.cancelled" } ] - } + }, + { "keys": ["alt+x"], "command": "plain_tasks_toggle_review", "context": [{"key": "selector", "operator": "equal", "operand": "text.todo"}] }, ] diff --git a/PlainTasks.py b/PlainTasks.py index aa4a83b..38c2b58 100644 --- a/PlainTasks.py +++ b/PlainTasks.py @@ -346,6 +346,7 @@ def runCommand(self, edit): open_matches = re.match(rom, line_contents, re.U) done_matches = re.match(rdm, line_contents, re.U) canc_matches = re.match(rcm, line_contents, re.U) + review_matches = re.search(r'@review', line_contents) started_matches = re.findall(started, line_contents, re.U) toggle_matches = re.findall(toggle, line_contents, re.U) @@ -358,6 +359,9 @@ def runCommand(self, edit): current_scope = self.view.scope_name(line.a) if 'pending' in current_scope: + if review_matches: + sublime.status_message('Cannot complete a task marked for review') + continue grps = open_matches.groups() len_cle = self.view.insert(edit, line.end(), canc_line_end) replacement = u'%s%s%s' % (grps[0], self.canc_tasks_bullet, grps[2].rstrip()) @@ -405,6 +409,42 @@ def runCommand(self, edit): PlainTasksStatsStatus.set_stats(self.view) self.view.run_command('plain_tasks_toggle_highlight_past_due') +class PlainTasksToggleReviewCommand(PlainTasksBase): + def runCommand(self, edit): + for region in self.view.sel(): + line = self.view.line(region) + line_contents = self.view.substr(line) + current_scope = self.view.scope_name(line.begin()) + + # Extract indentation + indent_match = re.match(r"^(\s*)", line_contents) + indentation = indent_match.group(1) if indent_match else "" + + if "@review" in line_contents: + # Remove @review tag + new_contents = re.sub(r"@review(\([^)]*\))?", "", line_contents).strip() + if "review" in current_scope: + # Change bullet from review to open + new_contents = new_contents.replace( + self.review_tasks_bullet, self.open_tasks_bullet, 1 + ) + else: + # Remove existing bullet + new_contents = re.sub( + r"^\s*[☐❍▪▫–—≡→›✘xX✓✔⚑]\s*", "", line_contents + ).strip() + + # Add review bullet and tag + new_contents = self.review_tasks_bullet + " " + new_contents + new_contents = new_contents.rstrip() + " @review" + + # Reapply indentation + new_contents = indentation + new_contents + + self.view.replace(edit, line, new_contents) + + PlainTasksStatsStatus.set_stats(self.view) + class PlainTasksArchiveCommand(PlainTasksBase): def runCommand(self, edit, partial=False): diff --git a/PlainTasks.sublime-completions b/PlainTasks.sublime-completions index db833fc..bbd9ab9 100644 --- a/PlainTasks.sublime-completions +++ b/PlainTasks.sublime-completions @@ -8,6 +8,7 @@ { "trigger": "s\t@started", "contents": "@started" }, { "trigger": "tg\t@toggle", "contents": "@toggle"}, { "trigger": "d\t@due()", "contents": "@due( $0)"}, - { "trigger": "cr\t@created", "contents": "@created"} + { "trigger": "cr\t@created", "contents": "@created"}, + { "trigger": "r\t@review", "contents": "@review" }, ] } \ No newline at end of file diff --git a/PlainTasks.sublime-syntax b/PlainTasks.sublime-syntax index 3bfafb6..62435f1 100644 --- a/PlainTasks.sublime-syntax +++ b/PlainTasks.sublime-syntax @@ -10,6 +10,10 @@ contexts: main: - match: '^\s*(\#?\s?\w+.*?:\s*?(\@[^\s]+(\(.*?\))?\s*?)*$\n?)' scope: keyword.control.header.todo + - match: '^\s*(?:[⚑])(?=\s)' + scope: punctuation.definition.bullet.review.todo + - match: '(?<=\s)@review(?![\w\d])' + scope: keyword.other.tag.review.todo - match: '^\s*(?:(\+|✓|✔|☑|√|\[x\])(\s+(?:[^\@\n]|(?bold + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical From fb4392822a32018061f14318cc92cca51046dcd3 Mon Sep 17 00:00:00 2001 From: Markus Schiller Date: Fri, 29 Nov 2024 11:28:38 +0100 Subject: [PATCH 2/3] feat: other themes, readme, tutorial --- Readme.md | 287 ++++++++++++++------------ messages/Tutorial.todo | 3 + tasks-dark.hidden-tmTheme | 43 ++++ tasks-eighties-colored.hidden-tmTheme | 43 ++++ tasks-eighties-dark.hidden-tmTheme | 43 ++++ tasks-gray.hidden-tmTheme | 43 ++++ tasks-monokai.hidden-tmTheme | 43 ++++ tasks-solarized-dark.hidden-tmTheme | 43 ++++ tasks-solarized-light.hidden-tmTheme | 43 ++++ 9 files changed, 456 insertions(+), 135 deletions(-) diff --git a/Readme.md b/Readme.md index 9e31799..c7f7c31 100644 --- a/Readme.md +++ b/Readme.md @@ -1,10 +1,12 @@ -## [PlainTasks](https://github.com/aziz/PlainTasks) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8d42f3e49d104ab8bf663392661b183b)](https://www.codacy.com/app/allen-bargi/PlainTasks?utm_source=github.com&utm_medium=referral&utm_content=aziz/PlainTasks&utm_campaign=Badge_Grade) +## [PlainTasks](https://github.com/aziz/PlainTasks) + +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8d42f3e49d104ab8bf663392661b183b)](https://www.codacy.com/app/allen-bargi/PlainTasks?utm_source=github.com&utm_medium=referral&utm_content=aziz/PlainTasks&utm_campaign=Badge_Grade) An opinionated todo-list plugin for Sublime Text (2 & 3) editor ![](http://cl.ly/image/1q100Q212o2Q/ss.png) ## Installation + To install this plugin, you have two options: 1. If you have Package Control installed, simply search for `PlainTasks` to install. @@ -12,18 +14,22 @@ To install this plugin, you have two options: 2. Clone source code to Sublime Text packages folder. ## Start a new todo-list -Bring up the command palette (it’s ⌘ + shift + p in OS X and ctrl + shift + p in Windows) and type `task` and select `Tasks: New document` command. + +Bring up the command palette (it’s ⌘ + shift + p in OS X and ctrl + shift + p in Windows) and type `task` and select `Tasks: New document` command. **NOTE:** Save your todo files with `todo`, `todolist`, `tasks` or `taskpaper` file extensions or just name them `TODO` with no extension. For more portability you can use `todolist.txt` either as a filename or as suffix for any arbitrary filename. ## Usage + **NOTE:** In Windows or Linux use ctrl instead of ⌘ + enter or ⌘ + i: new task ☐ ⌘ + d: toggle task as completed. +☐ ⌘ + x: toggle task in review. + ☐ ctrl + c: toggle task as cancelled on Mac. alt + c on Windows/Linux. ☐ ⌘ + shift + a will archive the done tasks, by removing them from your list and appending them to the bottom of the file under Archive project @@ -32,7 +38,7 @@ For more portability you can use `todolist.txt` either as a filename or as suffi ☐ ⌘ + shift + u will open the url under the cursor in your default browser, other than http(s) schemes must be enclosed within `<>`, e.g. `` -☐ Anything with colon at the end of the line is a project title, you can also nest projects by indenting them. +☐ Anything with colon at the end of the line is a project title, you can also nest projects by indenting them. ☐ You can write plain text as notes or descriptions wherever you want. Use `_` or `*` for italic and bold just like in Markdown. @@ -46,7 +52,7 @@ pending tasks with selected tags will remain visible (and their notes and projec `--` and then tab will give you this: `--- ✄ -----------------------` -☐ Completion rules (ctrl+space or alt+/ to see list of them): +☐ Completion rules (ctrl+space or alt+/ to see list of them): - type `t`, press tab — it’ll become `@today` — this one is highlighted differently than other tags; - `c`, tab — `@critical`; @@ -58,85 +64,85 @@ pending tasks with selected tags will remain visible (and their notes and projec - `d`, tab — `@due( )` If you press tab again, it’ll insert current date, same for `@due( 0)`. You can type short date (similar to [OrgMode’s date prompt](http://orgmode.org/manual/The-date_002ftime-prompt.html), but not the same) and then press tab to expand it into default format. - Short date should be __`@due(year-month-day hour:minute)`__ + Short date should be **`@due(year-month-day hour:minute)`** Dot can be used instead of hyphen, but should be consistent _`year.month.day`_ - - year, month, minute, hour can be omitted: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Notation Meaning
@due(1) 1st day of next month always
@due(--1) 1st day of current month always
@due(5) 5th day of current month (or next month if current day is 5th or older)
@due(2-3) February 3rd of current year or next one
@due(31 23:) 31st day of current/next month at 23 hours and minutes are equal to current moment
@due(16.1.1 1:1) January 1st of 2016 at 01:01 @due(16-01-01 01:01)
- - - relative period of time starts with a plus sign or two - __`+[+][number][DdWw][h:m]`__ — number is optional as well as letter `d` for days or letter `w` for weeks. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Notation Meaning
@due(+) tomorrow as well as @due( +1) or @due( +1d)
@due(+w) one week since current date, i.e. @due( +7)
@due(+3w) 3 weeks since current date, i.e. @due( +21d)
@due(++) one day since @created(date) if any, otherwise it is equal to @due(+)
@due(+2:) two hours since current date
@due(+:555) 555 minutes since current date
@due(+2 12:) 2 days and 12 hours since current date
+ - year, month, minute, hour can be omitted: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notation Meaning
@due(1) 1st day of next month always
@due(--1) 1st day of current month always
@due(5) 5th day of current month (or next month if current day is 5th or older)
@due(2-3) February 3rd of current year or next one
@due(31 23:) 31st day of current/next month at 23 hours and minutes are equal to current moment
@due(16.1.1 1:1) January 1st of 2016 at 01:01 @due(16-01-01 01:01)
+ + - relative period of time starts with a plus sign or two + **`+[+][number][DdWw][h:m]`** — number is optional as well as letter `d` for days or letter `w` for weeks. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notation Meaning
@due(+) tomorrow as well as @due( +1) or @due( +1d)
@due(+w) one week since current date, i.e. @due( +7)
@due(+3w) 3 weeks since current date, i.e. @due( +21d)
@due(++) one day since @created(date) if any, otherwise it is equal to @due(+)
@due(+2:) two hours since current date
@due(+:555) 555 minutes since current date
@due(+2 12:) 2 days and 12 hours since current date
☐ You can create a link to a file within your project by prefixing the file name with a dot and (back)slash like: `.\filename\` or `./another filename/`. - The line and column can be specified by colons: `.\filename:11:8`. - In SublimeText 3 you can specify a symbol inside that file by using \> character like: `.\filename>symbol`. - In SublimeText 2 you can specify a text inside that file by using inch characters like: `.\filename"any text"`. - Pressing ctrl + o (alt + o on Windows/Linux) will open the file in Sublime and scroll to specific position if any. - Also in SublimeText 3 link may point to directory, open such link will add the directory to current project (sidebar). - In addition, Markdown and “wiki” (Org-Mode, NV, etc.) styles are supported as well, examples: + The line and column can be specified by colons: `.\filename:11:8`. + In SublimeText 3 you can specify a symbol inside that file by using \> character like: `.\filename>symbol`. + In SublimeText 2 you can specify a text inside that file by using inch characters like: `.\filename"any text"`. + Pressing ctrl + o (alt + o on Windows/Linux) will open the file in Sublime and scroll to specific position if any. + Also in SublimeText 3 link may point to directory, open such link will add the directory to current project (sidebar). + In addition, Markdown and “wiki” (Org-Mode, NV, etc.) styles are supported as well, examples: ``` [](path) @@ -161,67 +167,69 @@ pending tasks with selected tags will remain visible (and their notes and projec ☐ Use **⌘ + r** to see a list of projects and quickly jump between them - ★ See the [Tutorial](https://github.com/aziz/PlainTasks/blob/master/messages/Tutorial.todo) for more detailed information. ## Settings -PlainTasks is an opinionated plugin, which means that it is highly configured to look in a specific way, but this does not mean that you can not customize it. If you feel that something does not look right and you want to change it, you can easily do it in your user settings file. + +PlainTasks is an opinionated plugin, which means that it is highly configured to look in a specific way, but this does not mean that you can not customize it. If you feel that something does not look right and you want to change it, you can easily do it in your user settings file. Go to `Preferences → Package Settings → PlainTasks` and open `Settings - User`, there you can override all the default settings, to get an idea you can take a look at `Settings - Default`. Here is a list of PlainTasks’ specific settings: -| Setting | Default | Options/Description | -| ------------------------------ | ---------------- | ----------------------------------------------------------------------- | -| **open_tasks_bullet** | `☐` | `-` `❍` `❑` `■` `□` `☐` `▪` `▫` `–` `—` `≡` `→` `›` `[ ]` | -| **done_tasks_bullet** | `✔` | `✓` `☑` `+` `[x]` | -| **cancelled_tasks_bullet** | `✘` | `x` `[-]` | -| **date_format** | `(%y-%m-%d %H:%M)` | See [strfti.me](http://www.strfti.me/) for quick reference; detailed documentation: [ST2](https://docs.python.org/2.6/library/datetime.html#strftime-and-strptime-behavior), [ST3](https://docs.python.org/3.3/library/datetime.html#strftime-and-strptime-behavior) | -| **done_tag** | true | Determines whether done tasks should gain a `@done` tag or not | -| **done_date** | true | Determines whether done tasks should gain a date or not | -| **before_tasks_bullet_margin** | 1 | Determines the number of spaces (default indent) before the task bullet | -| **project_tag** | true | Postfix archived task with project tag, otherwise prefix | -| **archive_name** | `Archive:` | Make sure it is the unique project name within your todo files | -| **new_on_top** | true | How to sort archived tasks (done_tag=true and default date_format are required)| -| **header_to_task** | false | If true, a project title line will be converted to a task on the certain keystroke | -| **decimal_minutes** | false | If true, minutes in lasted/wasted tags will be percent of hour, e.g. 1.50 instead of 1:30 | -| **tasks_bullet_space** | whitespace or tab | String to place after bullet, might be any character(s) | -| **highlight_past_due** | true | If true, highlight past, soon, and invalid `@due(something)` | -| **highlight_due_soon** | 24 | Hours as int, threshold to define which `@due` will be soon | -| **scope_past_due** | `string.other.tag.todo.critical` | Any scope, define color for past `@due` | -| **scope_due_soon** | `string.other.tag.todo.high` | Any scope, define color for `@due` will be soon | -| **scope_misformatted** | `string.other.tag.todo.low` | Any scope, define color for `@due` mismatch **date_format** | -| **icon_past_due** | `"circle"` | Gutter icon¹ | -| **icon_due_soon** | `"dot"` | Gutter icon¹ | -| **icon_misformatted** | `""` | Gutter icon¹ | -| **icon_critical** | `""` | Gutter icon¹ | -| **icon_high** | `""` | Gutter icon¹ | -| **icon_low** | `""` | Gutter icon¹ | -| **icon_today** | `""` | Gutter icon¹ | -| **show_remain_due** | false | In Sublime 3, show remain or overdue time under due tags | -| **show_calendar_on_tags** | false | In Sublime 3, if true, automatically show date picker when cursor is on tag (you can get date picker any time via context menu) | -| **due_preview_offset** | 0 | Place preview date outside of parens of `@due()`, 1 — within | -| **due_remain_format** | `"{time} remaining"` | `{time}` will be replaced with actual value | -| **due_overdue_format** | `"{time} overdue"` | `{time}` will be replaced with actual value | - -¹ Icon value can be `"dot"`, `"circle"`, `"bookmark"`, `"cross"`, `""`, or custom relative path to existing png file, +| Setting | Default | Options/Description | +| ------------------------------ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **open_tasks_bullet** | `☐` | `-` `❍` `❑` `■` `□` `☐` `▪` `▫` `–` `—` `≡` `→` `›` `[ ]` | +| **done_tasks_bullet** | `✔` | `✓` `☑` `+` `[x]` | +| **cancelled_tasks_bullet** | `✘` | `x` `[-]` | +| **date_format** | `(%y-%m-%d %H:%M)` | See [strfti.me](http://www.strfti.me/) for quick reference; detailed documentation: [ST2](https://docs.python.org/2.6/library/datetime.html#strftime-and-strptime-behavior), [ST3](https://docs.python.org/3.3/library/datetime.html#strftime-and-strptime-behavior) | +| **done_tag** | true | Determines whether done tasks should gain a `@done` tag or not | +| **done_date** | true | Determines whether done tasks should gain a date or not | +| **before_tasks_bullet_margin** | 1 | Determines the number of spaces (default indent) before the task bullet | +| **project_tag** | true | Postfix archived task with project tag, otherwise prefix | +| **archive_name** | `Archive:` | Make sure it is the unique project name within your todo files | +| **new_on_top** | true | How to sort archived tasks (done_tag=true and default date_format are required) | +| **header_to_task** | false | If true, a project title line will be converted to a task on the certain keystroke | +| **decimal_minutes** | false | If true, minutes in lasted/wasted tags will be percent of hour, e.g. 1.50 instead of 1:30 | +| **tasks_bullet_space** | whitespace or tab | String to place after bullet, might be any character(s) | +| **highlight_past_due** | true | If true, highlight past, soon, and invalid `@due(something)` | +| **highlight_due_soon** | 24 | Hours as int, threshold to define which `@due` will be soon | +| **scope_past_due** | `string.other.tag.todo.critical` | Any scope, define color for past `@due` | +| **scope_due_soon** | `string.other.tag.todo.high` | Any scope, define color for `@due` will be soon | +| **scope_misformatted** | `string.other.tag.todo.low` | Any scope, define color for `@due` mismatch **date_format** | +| **icon_past_due** | `"circle"` | Gutter icon¹ | +| **icon_due_soon** | `"dot"` | Gutter icon¹ | +| **icon_misformatted** | `""` | Gutter icon¹ | +| **icon_critical** | `""` | Gutter icon¹ | +| **icon_high** | `""` | Gutter icon¹ | +| **icon_low** | `""` | Gutter icon¹ | +| **icon_today** | `""` | Gutter icon¹ | +| **show_remain_due** | false | In Sublime 3, show remain or overdue time under due tags | +| **show_calendar_on_tags** | false | In Sublime 3, if true, automatically show date picker when cursor is on tag (you can get date picker any time via context menu) | +| **due_preview_offset** | 0 | Place preview date outside of parens of `@due()`, 1 — within | +| **due_remain_format** | `"{time} remaining"` | `{time}` will be replaced with actual value | +| **due_overdue_format** | `"{time} overdue"` | `{time}` will be replaced with actual value | + +¹ Icon value can be `"dot"`, `"circle"`, `"bookmark"`, `"cross"`, `""`, or custom relative path to existing png file, e.g. `"Packages/User/my-icon.png"`. ### Changing color scheme -If you don't like colors used in bundled schemes just copy any `.hidden-tmTheme` from PlainTasks to + +If you don't like colors used in bundled schemes just copy any `.hidden-tmTheme` from PlainTasks to your User directory, change colors and paste the code below in your user settings file: -``` json +```json { "color_scheme": "Path to your custom color scheme file. e.g. Packages/User/custom_plaintasks.hidden-tmTheme" } ``` **N.B.**, sometimes you have to restart Sublime Text to apply changes made in tmTheme file. -**N.B.**, `scope_past_due`, `scope_due_soon`, and `scope_misformatted` settings can assign any scopes defined in tmTheme file, e.g. +**N.B.**, `scope_past_due`, `scope_due_soon`, and `scope_misformatted` settings can assign any scopes defined in tmTheme file, e.g. you can set `"scope_past_due": "my.own.super.expired.whatever"` and then just add style definition in tmTheme for this scope. ### Taskpaper Compatibility -If you need to keep your files compatible with Taskpaper, go to + +If you need to keep your files compatible with Taskpaper, go to `Preferences → Package Settings → PlainTasks` and open `Settings - User`, then add these settings to the json file: @@ -234,34 +242,37 @@ add these settings to the json file: ``` ### Spell check + It is build-in feature of Sublime, you can toggle spell check with F6. For convinience, you may add bullets in list of ignored words into **`Preferences → Settings - User`**, e.g. ```json { - "ignored_words": [ "☐", "✔", "✘", "✄" ] + "ignored_words": ["☐", "✔", "✘", "✄"] } ``` ## [BONUS] Custom todo icon + PlainTasks comes with a custom todo icon that you can find in the `icons` folder. You can assign it to your todo files to give them a better look and distinguish them from other plain text files. Google and find out how to assign a custom icon to a file type in your operating system. ![](http://f.cl.ly/items/2t312B30121l2X1l0927/todo-icon.png) ## [BONUS] Custom Statistics + Statistics of current file are represented in status-bar, based on `stats_format`, which is `"$n/$a done ($percent%) $progress Last task @done $last"` by default — as you can see it’s just a string containing special directives (see table bellow) and regular chars. -| Directive | Description | -| ------------ | ----------------------------------------------------- | -| `$o` | Amount of pending tasks | -| `$d` | Amount of completed tasks | -| `$c` | Amount of cancelled tasks | -| `$n` | Sum of completed and cancelled tasks | -| `$a` | Sum of all tasks | -| `$percent` | Ratio of `$n` to `$a` | -| `$progress` | Percent as pseudo graphics (absents if less than 10%) | -| `$last` | Date of lastly completed task | -| `{{...}}` | Return `pending/completed/cancelled` tasks which matched by regex `...`;
e.g. `{{@tag}}` — amounts of tasks with `@tag`; or `{{@a|@b}}` — tasks with either `@a` or `@b` or both.
You may add several `{{...}}` to get separate stats for different tags. | +| Directive | Description | +| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `$o` | Amount of pending tasks | +| `$d` | Amount of completed tasks | +| `$c` | Amount of cancelled tasks | +| `$n` | Sum of completed and cancelled tasks | +| `$a` | Sum of all tasks | +| `$percent` | Ratio of `$n` to `$a` | +| `$progress` | Percent as pseudo graphics (absents if less than 10%) | +| `$last` | Date of lastly completed task | +| `{{...}}` | Return `pending/completed/cancelled` tasks which matched by regex `...`;
e.g. `{{@tag}}` — amounts of tasks with `@tag`; or `{{@a | @b}}` — tasks with either `@a`or`@b`or both.
You may add several`{{...}}` to get separate stats for different tags. | So you can customise it as you like, by adding to `Settings - User`, e.g. @@ -275,9 +286,11 @@ So you can customise it as you like, by adding to `Settings - User`, e.g. ``` ### Copy statistics + Bring up the command palette and type `Tasks: Copy Statistics`. ### Additional settings for progress bar + ``` { "bar_full": "■", // any char @@ -290,17 +303,20 @@ Bring up the command palette and type `Tasks: Copy Statistics`. ``` ## Introduction to PlainTasks Screencast + [![](http://i46.tinypic.com/9ggbd3.png)](https://www.youtube.com/watch?v=LsfGhjRVJwk) ## PlainTasks for other editors + NOTE: These are separate projects, maintained by some awesome developers other than us. + - [Atom: Tasks plugin](https://atom.io/packages/tasks) - [Vim: Plaintasks.vim](https://github.com/elentok/plaintasks.vim) - [Visual Studio Code: To Do Tasks](https://github.com/sandy081/vscode-todotasks) - [Visual Studio Code: Todo+](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-todo-plus) - ## Contributors + - @antonioriva - @binaryannie - [Ben Johnson](https://github.com/benjohnson) @@ -317,11 +333,12 @@ NOTE: These are separate projects, maintained by some awesome developers other t You can contribute on [github](https://github.com/aziz/PlainTasks) - ## Inspiration -- Thanks to Chagel for the [iTodo plugin](https://github.com/chagel/itodo). + +- Thanks to Chagel for the [iTodo plugin](https://github.com/chagel/itodo). - Thanks to [Taskmate for TextMate](https://github.com/svenfuchs/taskmate). - Thanks to [TaskPaper Mac application from hogbaysoftware.com](http://www.hogbaysoftware.com/products/taskpaper) ## License + Copyright 2012-2013 [Allen Bargi](https://twitter.com/aziz). Licensed under the MIT License diff --git a/messages/Tutorial.todo b/messages/Tutorial.todo index f2e471c..15668e0 100644 --- a/messages/Tutorial.todo +++ b/messages/Tutorial.todo @@ -19,6 +19,9 @@ Tasks: ☐ ⌘+d (ctrl+d on Windows) marks a task as done ☐ Pressing ⌘+d (ctrl+d on Windows) again puts it back in pending mode ☐ ctrl+c (alt+c on Windows) marks the task as cancelled + Review: + ☐ ⌘+x (alt+x on Windows) sets a task in review + ☐ Pressing ⌘+x (ctrl+x on Windows) again puts it back in pending mode Tagging: ☐ You can add tags using @ sign, like this @tag You can place cursors on tags, click right mouse button and **Filter by tags under cursors** diff --git a/tasks-dark.hidden-tmTheme b/tasks-dark.hidden-tmTheme index b180942..ffa95b2 100644 --- a/tasks-dark.hidden-tmTheme +++ b/tasks-dark.hidden-tmTheme @@ -536,6 +536,49 @@ bold
+ + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical diff --git a/tasks-eighties-colored.hidden-tmTheme b/tasks-eighties-colored.hidden-tmTheme index 6236357..74291a6 100644 --- a/tasks-eighties-colored.hidden-tmTheme +++ b/tasks-eighties-colored.hidden-tmTheme @@ -378,6 +378,49 @@ fontStyle + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + nameCritical scopestring.other.tag.todo.critical diff --git a/tasks-eighties-dark.hidden-tmTheme b/tasks-eighties-dark.hidden-tmTheme index 9cf179c..20d591d 100644 --- a/tasks-eighties-dark.hidden-tmTheme +++ b/tasks-eighties-dark.hidden-tmTheme @@ -388,6 +388,49 @@ bold + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical diff --git a/tasks-gray.hidden-tmTheme b/tasks-gray.hidden-tmTheme index 418df62..db48877 100644 --- a/tasks-gray.hidden-tmTheme +++ b/tasks-gray.hidden-tmTheme @@ -549,6 +549,49 @@ bold + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical diff --git a/tasks-monokai.hidden-tmTheme b/tasks-monokai.hidden-tmTheme index 0b7bfc3..2bd5146 100644 --- a/tasks-monokai.hidden-tmTheme +++ b/tasks-monokai.hidden-tmTheme @@ -524,6 +524,49 @@ bold + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical diff --git a/tasks-solarized-dark.hidden-tmTheme b/tasks-solarized-dark.hidden-tmTheme index 5a8f2fb..a1b38f6 100644 --- a/tasks-solarized-dark.hidden-tmTheme +++ b/tasks-solarized-dark.hidden-tmTheme @@ -534,6 +534,49 @@ bold + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical diff --git a/tasks-solarized-light.hidden-tmTheme b/tasks-solarized-light.hidden-tmTheme index 851ac5a..fcf4e04 100644 --- a/tasks-solarized-light.hidden-tmTheme +++ b/tasks-solarized-light.hidden-tmTheme @@ -534,6 +534,49 @@ bold + + name + Review Tag + scope + keyword.other.tag.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + + + + name + Review Task + scope + meta.item.todo.review + settings + + foreground + #FFA500 + background + #FFE4B544 + fontStyle + bold + + + + + name + Review Task Bullet + scope + punctuation.definition.bullet.review.todo + settings + + foreground + #FF8C00 + fontStyle + bold + + name Critical From 4da71cfe626f2a2790a729e242e5ea7261df2a6f Mon Sep 17 00:00:00 2001 From: Markus Schiller Date: Fri, 29 Nov 2024 11:32:10 +0100 Subject: [PATCH 3/3] feat: add review command --- Default.sublime-commands | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Default.sublime-commands b/Default.sublime-commands index a956648..f9ebe76 100644 --- a/Default.sublime-commands +++ b/Default.sublime-commands @@ -15,5 +15,6 @@ { "caption": "Tasks: Filter by tags under cursors", "command": "plain_tasks_fold_to_tags" }, { "caption": "Tasks: Add due date tag", "command": "plain_tasks_inject_due_date" }, { "caption": "Tasks: Sort items in the list under cursor by due date and priority", "command": "plain_tasks_sort_by_due_date_and_priority" }, - { "caption": "Tasks: Reverse sort items in the list under cursor by due date and priority", "command": "plain_tasks_sort_by_due_date_and_priority", "args": {"descending": true} } + { "caption": "Tasks: Reverse sort items in the list under cursor by due date and priority", "command": "plain_tasks_sort_by_due_date_and_priority", "args": {"descending": true} }, + { "caption": "Tasks: Toggle Review", "command": "plain_tasks_toggle_review" }, ]