Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to figure out functionality of moveTasksToProject #7

Closed
nrbray opened this issue Oct 4, 2019 · 4 comments
Closed

Unable to figure out functionality of moveTasksToProject #7

nrbray opened this issue Oct 4, 2019 · 4 comments

Comments

@nrbray
Copy link

nrbray commented Oct 4, 2019

Environment:

Linux redwider 5.0.0-29-generic #31~18.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ code-insiders --version
1.39.0-insider
d3eb24828e2d977e4f3ac16ff1a332a020028464
x64

Steps:

  1. Higlight text in todo.txt "(B) add new task"
  2. todotxt-mode: Move tasks to Project Markdown file
  3. I dialog select Project.md

Effect:

  • No change to file: Project.md

Tasks

(A) here add more +test @Laptop due:today note:tryout

  • Project.md has todo syntax highlighting (same before and after)
@davraamides
Copy link
Owner

davraamides commented Oct 5, 2019 via email

@DoctorRadar
Copy link

This is the feature that made me install the extension! For me, in an ideal world you'd be able to move the task to a file with a name matching the +project tag, e.g. project.md. And yes, if the task is in the project file already, no need to duplicate it, just remove it from the todo.txt file.

@davraamides
Copy link
Owner

davraamides commented Jan 23, 2020 via email

@davraamides
Copy link
Owner

This feature is now implemented in v1.4.14. The behavior is a little complex so I've copied the changelog notes below to explain:

  • If the current task is in a todo task file, the task will be removed from the current file and inserted into the appropriate project file.
  • If the task has a project tag and that tag is an exact match for a project file (excluding the leading + character and adding in the .md extension), the task will be moved without prompting the user for a file. Case is sensitive so a tag of +Foo will match the file Foo.md but not foo.md.
  • If the task does not have a project or the project tag is not an exact match with a filename, the user will be prompted to select a file.
  • A side effect of this process is that the project file will be opened in VS Code. The project tab becomes active for a second because the VS Code API does not currently allow loading a document without making it active.
  • The changes to both files are not saved. Thus if you make a mistake, you can easily undo both edits.
  • Multiple tasks are not supported right now as prompting for a file in a loop is not ideal, but it's also not clear if assuming all the tasks should be moved to the same project file is the right behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants