How do I get the output of a shell command into a Vim buffer?

You can use the “:r !” command to get the output of a shell command into a Vim buffer. For example, to insert the output of the “ls” shell command, you can use the following command:

    :r !ls

To insert the output of the shell command above the first line use the following command:

    :0r !ls

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind