irrationalistic / atom-tasks

Handle tasks/todo files in atom
MIT License
154 stars 22 forks source link

A way to highlight task titles #37

Open andylima opened 9 years ago

andylima commented 9 years ago

It would be great if task titles had a different class applied to them, the way Markdown headings have in the standard Markdown package — language-gfm.

With this feature, we would be able to colorize task titles (excluding their attributes) by specifying something similar to what I have in styles.less for Markdown headings:

  // for markdown
  .markup.heading.heading-1,
      .markup.heading.heading-2,
      .markup.heading.heading-3,
      .markup.heading.heading-4,
      .markup.heading.heading-5 {
    color: #00A450;
    font-weight: normal;

    .marker {
      color: #b3b3b3;
    }

  }

BTW, this is a motivational feature — I find that I'm more excited about doing a task when its name is shown with an appealing color. :)

irrationalistic commented 9 years ago

How would you call out which color to use? In markdown, the line starts with a differing number of #s, but that would look odd for project headings!

andylima commented 9 years ago

Oh, I wasn't thinking of different colors between task titles... Just one color for all task titles, so they're more appealing and easily distinguishable from the rest – notes text, labels, etc.

Example — colors are in square brackets:

- [blue] drink milk [green] @today [blue]

cow milk? rice milk? oat milk?
gotta try them all...
[default color]

- [blue] drink water [green]

...or maybe some tea?
[default color]
andylima commented 9 years ago

It would make sense though for at least cancelled and archived tasks to have different colors as well... Maybe red for cancelled, gray for archived (by default).

I myself don't use the cancel, nor archived, features though (I just remove the task, or move it to another file).

irrationalistic commented 9 years ago

I'm not sure i understand! Is there any chance you could do a mockup and send an image instead?

If you are talking about changing the colors set by the package, you can easily affect them in your own stylesheet for the editor atom > open your stylesheet.

andylima commented 9 years ago

OK, for the first line in the text mockup above:

- [blue] drink milk [green] @today [blue]

First [blue] means that the marker is in blue, the task title ("drink milk") is green, etc. So I was just specifying each color after the text it affected.

irrationalistic commented 9 years ago

So - would be blue, drink milk would be green, and @today would be blue? Would those colors be the same across the board? So all - would be blue, all the plain text would be green, and all attributes would be blue?

andylima commented 9 years ago

Would those colors be the same across the board? So all - would be blue, all the plain text would be green, and all attributes would be blue?

Yes. Except not all "plain text" — only the task titles... Not their notes — i.e., the plain text below a task title (that doesn't start with a task marker).

irrationalistic commented 9 years ago

Ok, so right now you can adjust your own colors for the syntax by using your stylesheet as I mentioned in a previous comment. Unfortunately the task description (non-markered text) doesn't have it's own class and it's due to the complexity of the dynamic marker system. I'll mark this as a new feature and make it something to add in a future commit!