-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add a keyboard shortcut for folding completed tasks #29
Comments
Thanks! So would it be a shortcut that you could hit on a line that would fold all nested (via indentation) lines below until one that is at the same level? Or are you thinking more globally? |
I was thinking more globally. Regardless of cursor position, you hit this shortcut and all completed tasks in the current file become folded. |
Only if they have child tasks? Just want to make sure I fully understand your goals! |
So here's the start of what I had in mind: mlms13@4f20cbe The goal is just to find any (non-archived?) completed or cancelled task, and if it has sub-tasks (ie if it can be folded), fold it. Currently my code isn't particularly good because:
I'll probably keep poking around this evening. This is the first I've looked at the Atom API (or really coffeescript, for that matter), so feel free to give me pointers if you have them. |
That sounds like a good direction! I haven't had a chance to work through it myself, but you might check out the task completion part that reads up looking for all projects that the task is a part of. Reversing the logic slightly by seeking through from the top and finding all tasks with children. If all the children are complete you could select up to the bottom most child and fold that selection. Hopefully that helps a little! |
How's this going? I may take a crack at solving it as well! |
Don't let me hold you back if you're interested. :) I haven't looked at it much since Friday. |
Ok, no worries! I want to do some thinking/planning on it to make sure it makes sense, so I'll do that when I get a chance and keep you posted. |
FYI on "Folding Text", which includes both folding and filtering. Code is there but it is not open source as he intends to charge for product in the future. It requires the HTML-based FTML format and not simply text files, so I suspect it has limited utility for a text based list, but I thought I'd pass it along in case it was useful. http://www.foldingtext.com/foldingtext-for-atom/ |
That looks pretty fancy! Seems that he would have had to build an entirely custom view (not using the normal text editor view). Not sure we'd need to do anything that drastic, my hopes are to hook into native atom code folding! But thanks for passing that along, very cool :) |
I agree that it's overkill. For ideas only... |
So I just looked back into this and I found that atom has built in commands for collapse and expand parent. It seems to work in my task files, so does this do what you need? Try going to a task in a project and using the hotkeys If, however, you mean to only fold up the completed/cancelled tasks under a given project, that's a different story and wouldn't be doable in this current structure. I'd have to build my own editor renderer on top of atoms (which relates to a couple of the other issues currently being discussed). For now, you'll just have to take advantage of the task-archiver! |
Yeah my goal was to collapse only the completed/cancelled tasks. I looked into this as well a few months ago, and I wasn't able to find a good way to tell Atom to collapse arbitrary rows. I'm happy to close this and live with archiving, since it's probably not worth the effort with Atom's current folding API. |
Thanks! I'm slowly exploring a re-write that replaces the text editor with a custom version that would allow us to do all sorts of fancy things, but is going to take a lot of work. We'll see how it goes! |
I tend to break tasks down into very small, nested pieces, so I love the ability to fold groups of completed tasks. It would be handy if a keyboard shortcut would exist to make this process a little quicker. Atom has some shortcuts for folding, but these are indentation-level-specific. It would be neat if atom-tasks would add a shortcut to fold everywhere that the line starts with some amount of whitespace followed by a checkmark.
Thanks for the awesome plugin, by the way!
The text was updated successfully, but these errors were encountered: