Is it possible to get the output of a system command to the command line?
Specifically, while in the command line, I would like to get the output of date +%Y-%m-%d after pressing, say, <c-d>. This is the best I could do:
cnoremap <c-d> system("%%Y-%%m-%%d")
Clearly, this is not the way.
Similar to this issue and needs expression register to work, which isn't there yet.
Thanks for your reply xaizek. At least, I will stop trying. :)
That issue was implemented, so the next version will allow doing this:
cnoremap <c-d> <c-r>=system("date +%Y-%m-%d")<cr>