A curses implementation of a todo list helper. Most of the keybindings are similar to Vim-bindings so Vim users should feel relatively comfortable.
- All major operating systems should be fully supported out-of-the-box. Please report a bug if you encounter any issues.
- Ndo is optimized for Linux, as most Vim users use Linux.
- MacOS is also supported however some keyboard shortcuts use different modifier keys.
- In Windows, general editing is available using the following external package, although some keyboard shortcuts might not work.
pip install pyfiglet pyperclip
pip install windows-curses
python3 todo.py [options] [filename]
Or with Docker:
./docker_build.sh
./docker_run.sh filename
Positional arguments:
Argument | Description |
---|---|
filename | Provide a filename to store the todo list in. Default is todo.txt . |
Options:
Option | Description |
---|---|
--bullet-display, -b | Boolean: determine if Todos are displayed with a bullet point rather than a checkbox. Default is False . |
--enumerate, -e | Boolean: determines if todos are numbered when printed or not. Default is False . |
--user-interface {curses,ansi,tkinter,none}, -g {curses,ansi,tkinter,none} | UiType: determine how todos should be rendered. Default is ansi . If none is passed, print state of a todolist to stdout without a user interface. |
--help, -h | Show this help message and exit. |
--help-file HELP_FILE | Allows passing alternate file to specify help menu. Default is README.md . |
--indentation-level INDENTATION_LEVEL, -i INDENTATION_LEVEL | Allows specification of indentation level. Default is 2 . |
--relative-enumeration, -r | Boolean: determines if todos are numbered when printed. Numbers relatively rather than absolutely. Default is False . |
--rename, -n | Boolean: if true, show prompt to rename file, rename file to input, and exit. Default is False . |
--simple-boxes, -x | Boolean: allow rendering simpler checkboxes if terminal doesn't support default ascii checkboxes. Default is False . |
--strikethrough, -s | Boolean: strikethrough completed todos - option to disable because some terminals don't support strikethroughs. Default is False . |
--title TITLE, -t TITLE | Allows passing alternate header. Default is filename . |
Key (arranged alphabetically) | Description |
---|---|
- | Insert blank line |
/ | Search for a sequence |
Alt+Shift+k/Alt+Shift+j | Select all todos above/below |
Alt+k/j | Move todo up and down |
Backspace | Combine with previous todo |
Ctrl+a | Select all todos |
Ctrl+r | Redo change |
Ctrl+x, k | Toggle toggle and entry modes |
Delete | Toggle between Todo and Note |
Enter | Toggle a todo as completed |
Numbers | Move a number of lines |
Shift+k/j | Select/deselect multiple todos |
Shift+o | Add a todo on current line |
Shift+t | Move todo to top, keep cursor in place |
Tab/Shift+Tab | Indent/unindent selected todo |
a | Display selected todo as an alert |
b | Make selected todo bigger (magnify) |
c | Change selected todo color |
d | Remove selected todo |
g/Shift+g | Jump to top/bottom of todos |
h | Show a list of controls |
i | Edit an existing todo |
k/j | Move cursor up and down |
o | Add a new todo |
n | Move to next search term location |
p | New todo from clipboard |
q, Ctrl+c, Esc | Quit |
s | Sort top-level todos various ways |
t | Move selected todo to top of list |
u | Undo change |
y | Copy todo to clipboard |
Key or shortcut | Description |
---|---|
Letters, numbers, punctuation, etc. | Add character to textbox |
Enter | Return to full list, saving changes |
Ctrl+c, Esc | Return to full list without saving |
Left/Right | Move the cursor left/right one space |
Ctrl+Left/Ctrl+Right | Move the cursor left/right one word |
Home | Move cursor to left end of textbox |
End | Move cursor to right end of textbox |
Backspace | Delete the character left of cursor |
Delete | Delete the character right of cursor |
Ctrl+Backspace | Delete the word left of cursor |
Ctrl+Delete | Delete the word right of cursor |
Tab | Indent line, to the right |
Shift+Tab | De-indent line, to the left |
Shift+Delete/Alt+Delete | Toggle whether line has checkbox |
Ctrl+x, k | Toggle toggle and entry modes |
Down | Split line at cursor |
Alt+h | Show a list of controls |
Pass arguments to ndo
without specifying explicitly on the command line.
Allows any existing options, separated by newlines
--bullet-display
--strikethrough
--indentation-level=4
--user-interface ansi
Ordered from highest precedence to lowest. (Top of the list overrides bottom of the list).
- Arguments passed directly to executable
./.ndoconfig
file in working directory~/.ndoconfig
file in home directory
Go to this link and upload your file
Use the following linters and formatters:
- pylint
- black
- ruff
- mypy
- vulture
- markdownlint
pytest test
Cannot connect to the Docker daemon at ... Is the Docker daemon running?
systemctl start docker
Description | Steps to reproduce | Expected result | Incorrect/actual result | Work-around or solution |
---|---|---|---|---|
Attempt to delete word using Alacritty terminal | In Alacritty, enter insert mode, then press ctrl+backspace | Word is deleted | Character is deleted | Use ctrl+w or alt+backspace instead |
Strikethrough completed todos using Curses UI | Run ndo with both --ui curses and --strikethrough (or -sgc ) |
Selected items show strikethrough | Program crashes with custom error | Run either with acurses rather than curses, or without strikethrough |