Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 87: Line 87:
 
</pre>
 
</pre>
   
  +
Or using double bang, at the current cursor position in normal mode:
Under Windows, use:
 
 
<pre>
 
<pre>
:r !date /t
+
!!date
 
</pre>
 
</pre>
 
Under Windows, use:
 
The above commands insert the output of the <code>date</code> program after the current line. If wanted, the <code>!!</code> command can be used to filter the current line, replacing it with the output of <code>date</code>.
 
 
<pre>
 
<pre>
!!date
+
:r !date /t
# Under Windows, use:
 
!!date /t
 
 
</pre>
 
</pre>
   
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)