[sf-lug] entering dates in vim text editor

alexkleider alexkleider at protonmail.com
Mon Nov 16 08:31:35 PST 2020


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, November 15, 2020 10:32 PM, Steve M Bibayoff <bibayoff at gmail.com> wrote:

> Hello,
>
> On Sun, Nov 15, 2020 at 10:21 PM alexkleider alexkleider at protonmail.com wrote:
>
> > !!date +%c
> > results in an error.
> > Can anyone shed any light?
>
> https://vim.fandom.com/wiki/Insert_current_date_or_time
>
> hth,
> Steve

Yes, thank you, it does help in that I've learned a way to do what I wanted.
It doesn't however address the not explicitly expressed question of how to specify a +FORMAT parameter for the date command when using the !!<cmd> vim method of entering the output of a command.
For instance:
  ::ls -lA
causes a listing to appear in the text
... but while
  ::date
causes the date to be entered, when the format parameter is added as in
  ::date +'%c'
what's entered is not at all what appears when the same
  $ date +'%c'
command is entered at the command line.

Again, thanks, Steve, for the reference.
Alex Kleider




More information about the sf-lug mailing list