Home Download Buy Blog Forum Support

Todo Manager

Todo Manager

Postby tanepiper on Sun Jan 08, 2012 4:47 pm

================
Sublime Text 2 Todo Manager
================

Sourcecode: https://github.com/tanepiper/sublime-todomanager
Sublime Text 2 forum thread: viewtopic.php?f=5&t=4491
Release: 1.1.4
Author: Tane Piper

Is available via the package manager for install.

Commands available through the command palate are:

* Todo: Add/Add at Line/Add at Function
* Todo: List All/Active/Done
* Todo: Open file
* Todo: Purge

All have keybindings for Windows, Mac and Linux (untested).

Adding a todo
-------------

Adding a todo is done in one simple way, but provides two convenience functions to speed up input.
The first way is to just add a todo `(Ctrl+Alt+t, Ctrl+Alt+a)` - this takes you through the following steps

1. Select a piority from A-D, or none
2. Enter the task text
3. Enter the line number `~' of the todo
4. Enter the function name '&' of the todo
5. Enter any projects entries `+` as space seperated entries
6. Enter any contexts entries `@` as space seperated entries

The line will then be appended to the bottom of the list. The two additional functions are Add-at-line `(Ctrl+Alt+t,Ctrl+Alt+s)` and Add-at-function `(Ctrl+Alt+t,Ctrl+Alt+f)` which autofill the lines or function box depending on which is selected. The function name is always the block of code you are in.

Viewing and filtering todos
---------------------------

Viewing todos is done throw the List All `(Ctrl+Alt+t,Ctrl+Alt+j)`, Active `(Ctrl+Alt+T,Ctrl+Alt+l)` and Done `(Ctrl+Alt+t,Ctrl+Alt+k)` commands.

When you view a list, you can navigate up and down the items. Pressing enter on any item will present the item
menu, with the following options

* Toggle done status - Change the todo display from active to done, or vice-versa
* Edit - Edit the todo in raw mode, a text box with the full todo item
* Move - Move the item up or down the list, you will be presented with Up or Down options
* Delete - Delete the item from the list, you will be asked to confirm this

To filter items, when you have a list open the command palate allows further keypresses. For example if you have the line:

* (A) Finish off refactoring ~45 +MyProject @refactor @release

If you wanted to find this item by it's line number you would type `~45` and the list will be filtered to display only
this item, or all items with a `~45` next to them.

Purge done items and opening files
----------------------------------

Purging done items `(Ctrl+Alt+t,Ctrl+Alt+p)` removes all done items from the todo file. You will be asked before you want to do this.

Opening the file `(Ctrl+Alt+t,Ctrl+Alt+o)` opens the file as a plain text file to be edited in Sublime Text 2

File location
-----------------------------

In the settings file, you can change the `todo_home` option, currently set to none. This is the location you
wish to save the files - it might be somewhere like a dropbox folder.

The default folder is `$HOME/.todomanager`

Files are kept in the name format 'todo-<filename-md5>.txt' base on the current active file - this means you have a todo per file. If you want the contents of the todo file, it's best to just open it via the command.

Future features
---------------

* UI for changing priority
* Search over todo file contents
* List all todo files
* Provide way to mark source with todo information
Last edited by tanepiper on Sun Jan 15, 2012 10:29 pm, edited 2 times in total.
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: Todo Manager

Postby tanepiper on Sun Jan 15, 2012 1:15 pm

New release of todo manager today - completely re-written from the ground up to be a little more MVC and available via package manager. Updated readme in OP
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: Todo Manager

Postby tanepiper on Sun Jan 15, 2012 10:31 pm

Another release, this time with the ability to move todo items up and down in a file - and the readme is updated to be a bit more informative
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: Todo Manager

Postby iamntz on Mon Jan 16, 2012 5:17 am

There might be a small issue:
Code: Select all
Reloading plugin C:\Users\Ionut\AppData\Roaming\Sublime Text 2\Packages\Todo Manager\TodoManager.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 59, in reload_plugin
  File ".\TodoManager.py", line 3, in <module>
    class TodoFile(object):
  File ".\TodoManager.py", line 57, in TodoFile
    def __init__(self, parent_file_path, settings, show_state=TodoFile.SHOW_STATE_ALL):
NameError: name 'TodoFile' is not defined


Obviously enough, the plugin doesn't work :D
iamntz
 
Posts: 917
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Todo Manager

Postby tanepiper on Mon Jan 16, 2012 9:22 am

Hopefully should be fixed now - weird it was working fine on my laptop, but not on my mac - small fix in place for now.
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: Todo Manager

Postby sublimator on Mon Jan 16, 2012 9:29 am

>>> weird it was working fine on my laptop, but not on my mac

>>> def __init__(self, parent_file_path, settings, show_state=TodoFile.SHOW_STATE_ALL):

Defaults are evaluated at `compile` time. Due to the way reload() works in Python (the basis for hot reloading plugins in Sublime) `TodoFile` would have been available while developing for yourself (assumedly on your laptop) For others though, it would have thrown that NameError.

You can actually do things like:
Code: Select all
try:
    reloads += 1
except NameError:
    reloads = 0

if reloads: print 'Reloads: %s' % reloads


What that tells you is all the previous globals() are still available.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Todo Manager

Postby tanepiper on Mon Jan 16, 2012 9:49 am

castles_made_of_sand wrote:lts are evaluated at `compile` time. Due to the way reload() works in Python (the basis for hot reloading plugins in Sublime) `TodoFile` would have been available while developing for yourself (assumedly on your laptop) For others though, it would have thrown that NameError.


Ahh, when you don't do Python in anger for about a year, I forget these things. Makes sense. I might move some of that code about anyway in the next refactor when I adding a the last couple of features I want in.
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: Todo Manager

Postby sublimator on Mon Jan 16, 2012 10:21 am

@tanepiper

Yeah, it's an easy gotcha. There's another one: when you delete a sublime.EventListener (comment it out for example) sometimes it will hang around and pump out the event handlers. Or sometime's you'll rename some function, and somehow forget to update the usages ( someone calls your for lunch or something -- or your a scatterbrain like moi) it will use the old function which will still be around. Another one is editing some dependency file and forgetting that it doesn't get auto reloaded and that even if it did you'd have to reload any modules that depend on it, to get the latest version ... Another is ....
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Todo Manager

Postby Hansiek on Mon Mar 05, 2012 9:27 am

"There's another one: when you delete a sublime.EventListener (comment it out for example) sometimes it will hang around and pump out the event handlers.".. this clears a significant part of my doubt..
Hansiek
 
Posts: 3
Joined: Mon Mar 05, 2012 9:18 am


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 5 guests