-
Notifications
You must be signed in to change notification settings - Fork 715
Manipulating dates with Chronic
Alex Leferry 2 edited this page May 17, 2018
·
4 revisions
A natural language date and time parser.
2018-03-21
|chronic '%A, %d %B %Y'
Wednesday, 21 March 2018
2018-03-21
|chronic tomorrow %F
2018-03-22
Grep things to do over the next 7 days:
grep-period 'To do' '%F' today week
define-command grep-period -params 4.. -docstring 'grep-period <pattern> <format> <time-start> <time-end> [argument…]: Grep period' %{ %sh{
pattern=$1
format=$2
start=$3
end=$4
shift 4
factory=day
format="($pattern.+$format)|($format.+$pattern)"
regex=$(
chronic-period "$format" "$start" "$end" "$factory" |
paste --serial --delimiters '|'
)
printf "grep '%s' %s" "$regex" "$@"
}}
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV