I am trying to print the current formatted as Mon, 1 Jan 2022 into my current file in vim. So far I've tried the following command, but the % sign gets put into the command as the current file.
:0r !date '+%a, %d %b %Y'
This ends up giving me an output similar to seen below.
/home/user/file.txta, /home/user/file.txtd /home/user/fileb /home/user/fileY
The issue is that the path to the current file is put in place for % as vim does, but that is causing issues for the current use case.
Any help is appreciated