May 2018
Intermediate to advanced
168 pages
4h 2m
English
| Tip 19 | Sending Commands to a Terminal Buffer |

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.
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 ...