Skip to Content
Mastering Vim
book

Mastering Vim

by Ruslan Osipov
November 2018
Beginner
330 pages
7h 21m
English
Packt Publishing
Content preview from Mastering Vim

Terminal mode

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:

:term

This ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Vim

Mastering Vim

Damian Conway
Vim Masterclass

Vim Masterclass

Jason Cannon
Modern Vim

Modern Vim

Drew Neil

Publisher Resources

ISBN: 9781789341096Supplemental Content