On Thursday, April 11, 2013 4:19:28 AM UTC-5, John Little wrote:
> > I am trying to insert date when opening a new fortran file, as shown below, >
> > which is wrong.
>
> :exe executes vim stuff, not system stuff. Maybe you want
>
> read !date
>
> if the date command's output is what you want; I would want to use a format, say
>
> read !date "+\%y-\%b-\%d \%T"
>
> I would prefer using the built in strftime, because it's simpler, and fits with the other puts:
>
> put=strftime('%d-%b-%y %T')
>
> Regards, John Little
See also: http://vim.wikia.com/wiki/Insert_current_date_or_time
--
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Thursday, April 11, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment