Saturday, May 9, 2009

Read Command Output in Vim

In order to insert output of a command while in Vim
editor. Just give following command.

:r !
any_command

Replace any_command with the command you want to use.


22
23

Suppose we want insert date at line number 23,
goto line number 23, by pressing
G23
Then type following command
:r !date

22
23 Sat May 9 20:15:56 IST 2009

No comments: