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

Sort todo lists #349

Open
dvor opened this issue May 18, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@dvor
Copy link

commented May 18, 2017

It would be nice to have ability to have "todo" items always on the top of a list and "done" items automatically moved to the bottom. This way there would be no need to manually clean up todo list and history of old items will be always available.

Some examples ( symbol means that this item will be toggled):

- [ ] One        - [ ] One
- [✓] Two    ->  - [ ] Three
- [ ] Three      - [X] Two
- [X] Four       - [X] Four


- [ ] One                      - [ ] One
- [o] Two                      - [ ] Three
    - [✓] some subtask         - [X] Two
    - [X] another subtask   ->     - [X] some subtask
- [ ] Three                        - [X] another subtask
- [X] Four                     - [X] Four
@dwainm

This comment has been minimized.

Copy link

commented May 30, 2017

This can be done with :sort command

Visually select the list and the run :'<,'>sort

The completed ones will jump to the bottom. If you want it the other way around run:
:'<,'>sort!

@dvor

This comment has been minimized.

Copy link
Author

commented May 30, 2017

@dwainm sort is not working correctly with nested list. It sorts list alphabetically, which is not desired behavior. For example

- [X] One                 - [ ] Two A
- [ ] Two                 - [ ] Two B
    - [ ] Two A  ->   - [ ] Three
    - [ ] Two B       - [ ] Two
- [ ] Three           - [X] One
@Nudin

This comment has been minimized.

Copy link
Collaborator

commented Oct 24, 2017

I have this on my todo-list. But will probably do only after the big refactoring is done. If someone else want's to do you're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.