Historically, you can run shell commands from Vim by using :! followed by a shell command. For example, we could execute our Python program as follows:
:!python3 animal_farm.py cat dog sheep
Vim will pause, and you'll see the output in the Terminal:
Things have got better since then.
In version 8.1, Vim introduced the terminal mode. The terminal mode is effectively a Terminal emulator running within your Vim session. Unlike with tmux, terminal mode plays with Vim out of the box. It's great for running long running commands while you continue to work in Vim.
Terminal mode can be invoked by executing the following: