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

indented please? #1

Open
6 tasks
tomByrer opened this issue May 16, 2014 · 6 comments
Open
6 tasks

indented please? #1

tomByrer opened this issue May 16, 2014 · 6 comments

Comments

@tomByrer
Copy link

This project looks neat!
Do you support indentation? Helps with subtasks

  • add indentation
    • find GitHub's Markdown repo
    • snag their code
    • build & test inside todo-md
    • PR code & doc change
    • tell the world!
@Hypercubed
Copy link
Owner

Yes, it is partially there. If you are adding a new line it is indented using the previous line's white-space. This obviously only works if you manually added white space outside of todo-md. I need to add a way to manually set the indent level from the command line. Coming soon! Thank you.

@tomByrer
Copy link
Author

cool thanks!

@Hypercubed
Copy link
Owner

Any suggestion on the cli format. I implemented todo add "New task" --indent 2 but it feels ugly. I've been thinking of adding controls into the task description itself. Something like todo add "+New task" to indent and todo add "New task +done" to mark as done.

@tomByrer
Copy link
Author

Thanks for asking for feedback. Oh, for some reason I assumed you were just going to indent 2 spaces as if you were entering in normal GFM:
todo add " New task"
Your "+New task" is close.
Or maybe
todo add "New task" sub
So you can then do:
todo add "New task" sub "Parent Task"

@Hypercubed
Copy link
Owner

I guess todo add "New task" sub is nearly the same as todo add "New task" --indent. As it is it would not work because sub would be assumed to be the index of where to add. With --indent we can do --indent 2 etc.

Using the prefixed spaces as the indent level could work as well but how do you indicate unindent? I was thinking "-New task".

The todo add "New task" sub "Parent Task" type of nesting will come when I add tags. I was thinking of something like todo add "New task" @parent but I need to think more. Until then this the same as todo add "New task" [parent_index] --indent.

I plan to implement todo indent [range] and todo unindent [range] so we can indent and unindent a whole ranges of tasks.

@tomByrer
Copy link
Author

Yes, there are many paths, & you have alot of good ideas.
Either road you take, I hope there is harmony in flags.
Eg this is disharmonious: --indent vs @parent (should be --parent)
This is more harmonious: +new & -new; since - un-indenting my space-indention is confusing.

Indenting & unindenting ranges is interesting, but for me at that point I'd just open an editor. Though perhaps would like it.

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

No branches or pull requests

2 participants