commit f1d50cf51c1b5f0a7479ed0571284caad8532d4d
parent 4953d4930fb440ff3b5a3707d1443ad67417c163
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 9 Sep 2019 14:11:54 +0200
Add binding to mark TODO item as done
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua
@@ -91,6 +91,12 @@ vis.events.subscribe(vis.events.INIT, function()
vis:map(vis.modes.NORMAL, leader..'T', ':e ~/doc/todo.md<Enter>')
vis:map(vis.modes.NORMAL, leader..'w', ':w<Enter>')
vis:map(vis.modes.NORMAL, leader..'x', ':wq<Enter>')
+ vis:map(vis.modes.NORMAL, leader..'X',
+ function() -- mark todo item as done and append date
+ vis:feedkeys('f[c3l[x]<Escape>A **<Escape>h')
+ vis:command(':< printf "$(date +"%Y-%m-%d %H:%M")"')
+ vis:feedkeys('^')
+ end)
vis:map(vis.modes.VISUAL, leader..'y', ':> xsel -i<Enter>')
vis:map(vis.modes.VISUAL, leader..'Y', ':> xsel --clipboard -i<Enter>')