Skip to content

Instantly share code, notes, and snippets.

@innyso
Last active May 16, 2020 05:22
Show Gist options
  • Select an option

  • Save innyso/78c1ddf20e958c45813c3389654ee261 to your computer and use it in GitHub Desktop.

Select an option

Save innyso/78c1ddf20e958c45813c3389654ee261 to your computer and use it in GitHub Desktop.
#vim #cmd

Insert the result of a command to the current file:

# insert result of ls to current file
:r !ls

where

:r --> :r file Read contents of a file to the workspace

! --> ! calls an external process in vim. This can be very useful.

in this case we call ls and put the result to the current workspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment