Move insert-datestamp to "C-x d" from "M-d"
authorFrank Terbeck <ft@grml.org>
Fri, 18 Aug 2017 12:09:25 +0000 (14:09 +0200)
committerFrank Terbeck <ft@grml.org>
Fri, 18 Aug 2017 12:09:25 +0000 (14:09 +0200)
"M-d" is obviously used in emacs mode by default. The "C-x ..." prefix is used
for other purposes in our setup already and this particular binding is free.

Closes: #62

etc/zsh/zshrc

index 51694da..ca90043 100644 (file)
@@ -1087,7 +1087,7 @@ function help-show-abk () {
 
 zle -N help-show-abk
 
-# press "ctrl-e d" to insert the actual date in the form yyyy-mm-dd
+# press "ctrl-x d" to insert the actual date in the form yyyy-mm-dd
 function insert-datestamp () { LBUFFER+=${(%):-'%D{%Y-%m-%d}'}; }
 zle -N insert-datestamp
 
@@ -1477,7 +1477,7 @@ bind2maps emacs viins       -- -s ' ' magic-space
 #k# Trigger menu-complete
 bind2maps emacs viins       -- -s '\ei' menu-complete  # menu completion via esc-i
 #k# Insert a timestamp on the command line (yyyy-mm-dd)
-bind2maps emacs viins       -- -s '\ed' insert-datestamp
+bind2maps emacs viins       -- -s '^xd' insert-datestamp
 #k# Insert last typed word
 bind2maps emacs viins       -- -s "\em" insert-last-typed-word
 #k# A smart shortcut for \kbd{fg<enter>}