Sunday, June 28, 2020

Re: Date in a boilerplate file

Thank you. I was indeed considering something like this -- perhaps a srot of "preprocessing" of the file.
Best regards,
guido

Il giorno sab 27 giu 2020 alle ore 16:43 Mateusz Okulus <mmokulus@gmail.com> ha scritto:
On Tue, Jun 23, 2020 at 09:56:34AM -0700, Guido Milanese wrote:
> In a project I am developing, I have written some boilerplate files to be
> used as headers for Markdown/LaTeX documents. One of the lines contains the
> document date, and ideally it should be:
>
> date: <TODAY>

I think it's easier to use unix tools instead of vim for this.

sed "s/<TODAY>/$(date)/g" [file]...

You can specify multiple files, and make changes permanent
with -i flag.

Regards,
mat

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/MMZU37fWr7g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200627144337.zjtirp4sceegzatc%40debian.


--
Guido Milanese - Professor of Classics - Docteur H.C. Paris ICP
Universita' Cattolica d.S.C., Milano - Brescia
http://docenti.unicatt.it/ita/guido_fabrizio_milanese

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAFsD75TCJW2nBP4VFzd5DvR7G0Yz4VGqSpOFbFhvQK%2BBSyVUOQ%40mail.gmail.com.

No comments: