On Tue, Sep 10, 2019 at 7:32 AM 'Ottavio Caruso' via vim_use 
<vim_use@googlegroups.com<mailto:vim_use@googlegroups.com>> wrote:
Hi all,

I have this bash alias:
alias my-date='date +"%A %d %B %Y"'

and this line in vimrc:
set shellcmdflag=-ic

I want to insert (prepend) a timestamp at the beginning of a non-empty
line, without line breaks, but if I type:

:r !my-date

this will print the timestamp on the next line, that is the line below
the cursor.

Is there a way to achieve what I want?

Thanks

--
Ottavio Caruso

--

I recently set up a map like this:
map <leader>H :exec 'norm i' . system("echo -n 'Chronicle Herald, '") . 
system("date +'%A, %B %d, %Y'")<cr>

 Perhaps you could experiment with that idea?

--
John Cordes

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAGZBEdQa6j8PiCKOotDURQB4cFB2jLQuFviY4kNN0G3dxYe%2BcA%40mail.gmail.com.

Reply via email to