Skip to Content
Modern Vim
book

Modern Vim

by Drew Neil
May 2018
Intermediate to advanced
168 pages
4h 2m
English
Pragmatic Bookshelf
Content preview from Modern Vim
Tip 19Sending Commands to a Terminal Buffer
images/neovim-only.png

With Terminal mode, you can interact directly with a process running inside a terminal buffer. It’s also possible to interact with such a process by remote control, by calling the jobsend() function. The beauty of this is that you can use Vim script to automate certain interactions with a program. In this tip, you’ll create a simple :Restart command that you can use to restart a web server.

Preparation

The source code that accompanies this book includes a webapp directory. Switch to that directory and install the dependencies using npm:

=> $ cd code/webapp
=> $ npm install

Now open a terminal ...

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

Vim Masterclass

Vim Masterclass

Jason Cannon
Mastering Vim

Mastering Vim

Ruslan Osipov

Publisher Resources

ISBN: 9781680506006Errata Page