Jump between vim and shell
You have 2 options to working on shell without leaving vi:
-
":sh" + "C-d": you don't know if you are in a "real" shell;
-
"C-z" + "fg": you can check if you've suspended a vim with "jobs", recommended;
Insert outside text into vim buffer
-
from another file: ":r
"; -
from external command: ":r !
", for example:
:r !ls -l|grep abc
Ref: https://www.linux.com/learn/tutorials/442419-vim-tips-working-with-external-commands