Tip 16Running Programs in a Terminal Buffer
images/neovim-only.png

Neovim can run external processes and capture their output in a terminal buffer. These buffers are displayed in Vim’s windows just like any other buffer. In this tip, you’ll learn how to create a terminal buffer and how to kill the process running within.

Starting Programs in a Terminal Buffer

Let’s start by reviewing some of the methods that Vim provides for running external programs. You can use the :!{cmd} command to execute a command in a shell. To see how this works, use cat to inspect the contents of the /etc/shells file:

=> :!cat /etc/shells
<= # List of acceptable shells for chpass(1). ...

Get Modern Vim now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.