When scrolling down we need to switch to valign=bottom to properly show
last lines of the TodoWidget at the end of the TodoListWidget. Also
config <Down> key to use 'down' action in default config. Without such
config entry, using <Down> key would not take advantage of valign fix.
Also do not focus dividers when jumping with 'home' shortcut.
Lookup mechanism:
1. Check whether an editor was given with the -E flag:
topydo edit -E vim
2. Use the value of $TOPYDO_EDITOR
3. Use the value in the configuration file:
[edit]
editor = vim
4. Use the value in $EDITOR
5. Use 'vi' if the above fails.
This makes it easier to invoke an editor as vim with additional
parameters, for instance by adding the full todo.txt file to the
completion options (see the tip in issue #164). This trick was added to
the configuration file as a comment.
1. 'm' can be reconfigured to any other key (action: 'mark').
2. Using 'mark' on already marked todo item will unmark it.
3. 'esc' key will clear whole selection.
4. Command will be executed on **all** marked items in **all** columns.
The -C flag takes 0, 1, 16, 256, auto, yes, true, no, false as possible
values.
If auto, then colors are enabled unless the output is not connected to a
TTY and is likely not to understand ANSI escape codes. 'auto' is the
default value.
The config().colors() function either returns 0, 16 or 256 for the
possible colors that can be displayed.
These values are also recognized by the colors option in the
configuration file.
This fixes issue #111.
Special keys in config should follow similiar syntax to that used in
vim:
left arrow = `<Left>`
right arrow = `<Right>`
page down = `<Page down>`
home = `<Home>`
esc = `<Esc>`
F4 = `<F4>`
Ctrl+s = `<C-s>`
Meta+k = `<M-k>`
Examples:
=========
```ini
[column_keymap]
<Left> = prev_column
<Right> = next_column
<Esc>k = home
<C-s> = tag {} foo 1
<M-s> = tag {} foo
```
Action names and default config for them:
```ini
[column_keymap]
0 = first_column
$ = last_column
h = prev_column
l = next_column
A = append_column
I = insert_column
E = edit_column
D = delete_column
Y = copy_column
L = swap_left
R = swap_right
```
User can now specify key-shortcuts in main topydo config file under
'column_keymap' section in form of:
`<SHORTCUT> = <ACTION>`
Two main types of action are supported:
- built-in (one of: 'home', 'end', 'up', 'down', 'postpone', 'postpone_s'
and 'pri')
- topydo commands (aliases included). Prefixed with 'cmd'. Commands to
call on selected todo item should contain '{}' placeholder to mark its
place in final command call in similiar fashion as in aliases
definitions.
postpone, postpone_s and pri shortcuts are sort of prefixes for
arguments for respective topydo commands triggered on selected todo item:
- `postpone<COUNT><PERIOD>` will translate to `cmd postpone {}
<COUNT><PERIOD>`. postpone_s will do the same but with '-s' flag
added.
- `pri<PRIORITY>` will translate to `cmd pri {} <PRIORITY>`
Default config as an example:
```ini
[column_keymap]
gg = home
G = end
j = down
k = up
d = cmd del {}
e = cmd edit {}
u = cmd revert
x = cmd do {}
pp = postpone
ps = postpone_s
pr = pri
```
- pp23d will postpone selected item by 23 days
- ps1m will postpone selected item (threshold date included) by 1 month
- prz will set priority of selected item to (Z)
With this change there is now possible to forward args supplied on CLI
to desired placed in real command.
Example config:
[aliases]
star = tag {} star 1
unstar = tag {} star
Example usage:
`topydo star foo` will resolve to: `topydo tag foo star 1`
`topydo unstar foo` will resolve to: `topydo tag foo star`
User can now mark place in list_format from where he wants to start
right-aligning remaining content. Tab character (\t) is used as marker.
Added also 'top' alias example to topydo.conf which utilizes this
feature and implements #52.
Minor:
- remove `- 1` from statements setting line width
- move strip_braces() to topydo.lib.ListFormat and rename it to
strip_placeholder_braces()
fixup strip_braces
It calculates if actual todo id is shorter than 3 characters and adds
additional space or two to maintain fixed length of this parameter.
Also set %I as default instead of %i to provide compatibility with
tests and.
These conditional characters should be specified **inside** curly braces
({}) and **after** percent sign (%). They can appear in two groups:
before and after particular placeholder.
Example:
"list_format = %{(}p{)}"
If priority of given todo is C, "list_format" set above will now resolve
to (C), but also won't display empty parentheses if there is no priority
set.
Fixes issue mentioned in 8650033bdb
The `ls` output can be customized with the list_format option in the
configuration, or the `-F` flag for `ls`.
Open issues:
* Relative dates to be implemented (see PR #52)
* Using (%p) without todo items without priority results in ()
* Ability to print todo on a single line (see PR #52)
Backups containing whole todolist and archive can be now saved after
execution of each "read-write" command. Furthermore this change creates
base for eventual "revert" command.
Backups are safely stored and indexed in our own JSON-based format which
is compatible with python2.x and python3.x. We also use zlib compression
to minimize size of backup file. Path of the backup file is always
relative to the todo file, so backups from different todo files won't
mix up.
User can configure number of stored backups with new config option -
"backup_count". Any positive number will tell topydo to store that very
number of backups. Setting "backup_count" to 0 will completely turn off
backup functionality.
No need to toggle the highlighting of projects and contexts anymore. If
you want to turn it off, simply assign an empty value to the
project/context colors:
[colorscheme]
project_color =
context_color =
- Add new module `topydo.lib.Colors` and class `Colors` for handling
output colors and their ANSI codes.
- Create new config options with colors for priorities, projects,
contexts, metadata, and links and place them under "colorscheme"
section. When certain config option is absent default color code will be
applied.
- Empty values:
! priority_colors will fall back to NEUTRAL_COLOR
! project_color, context_color, link_color, metadata_color will
return empty string, so priority_color (if configured and applicable) of
specific item should be used
- Return NEUTRAL_COLOR if supplied color number is out range
- Support user-friendly color names in config. At least for 16 base
terminal colors.
topydo may introduce some internal tags, such as 'id' and 'p' for
dependency tracking, and 'ical' for keeping track of unique ids when
outputting iCalendar files.
Add a pretty printer filter that prevents certain tags from displaying
in the 'ls' output. These tags can be configured with the 'hide_tags'
configuration option in the 'ls' section, a comma-separated list of
tags (default: id,p,ical). To always show all tags, leave an empty
value.