vnix27 Asked: 2011-03-09 05:46:53 +0800 CST2011-03-09 05:46:53 +0800 CST 2011-03-09 05:46:53 +0800 CST Command output in vi editor 772 I open a text file using vi editor in linux and want to insert date command output without exiting vi editor. What is the trick? Thanks linux vim vi 1 Answers Voted Best Answer pablo 2011-03-09T05:50:18+08:002011-03-09T05:50:18+08:00 Is this what you mean? :r !date or to add one week to the current date: :r !date -d “today 1 week” Also see this post: https://stackoverflow.com/questions/56052/best-way-to-insert-timestamp-in-vim
Is this what you mean?
:r !date
or to add one week to the current date:
:r !date -d “today 1 week”
Also see this post: https://stackoverflow.com/questions/56052/best-way-to-insert-timestamp-in-vim