VIM Advanced: read

VIM Advanced: read

We can use :read (or :r) to append ouput of an external command.

Examples

#1

1
:r !ls *

Output:

1
2
3
4
5
6
README.md
common_headers.py
data
find_missing_values.py
pandas
seaborn

#2

1
:r !date

Output:

1
Sun Feb  9 06:05:42 CST 2020

#3

1
:r !pwd

Output:

1
/users/lolimay/code/unknown