What’s Next for Vim 8

Vim’s pace of development has really picked up since the Neovim fork was created. Neovim was first to introduce features such as job control and a terminal emulator, but Vim 8 is catching up. It seems as though the competition has benefited both projects.

Adding :terminal support

In July 2017, Bram Moolenaar added patch 8.0.0693 to Vim introducing a basic implementation of a :terminal command. I’ll admit that it took me by surprise. Not least because Vim’s documentation (:help design-not) has long stated that:

Vim is not a shell or an Operating System. You will not be able to run a shell inside Vim or use it to control a debugger. This should work the other way around: Use Vim as a component from a shell or in an IDE.

The philosophy of Vim’s design could be summarized: Vim may be hosted inside another program, but it may not act as host to other programs. This constraint has guided the way that we use Vim for years. Introducing a :terminal command goes against this foundational design decision, and makes it possible to do things that were previously impossible. I’m watching with interest to see how this feature evolves.

At the time of writing, the :terminal command is still a work in progress. It’s not yet stable enough for me to write about, but I hope to be able to cover the feature in a later edition of this book if the feature turns out to be useful. I can speculate about how some of the topics discussed in this book will be affected by this new feature.

If you want to use the fzf plugin in GVim, you currently have to configure the plugin to launch an external terminal emulator. (This is not required when you run Terminal Vim, because fzf can use the host terminal.) When the :terminal command becomes available, it will be possible for GVim to use the built-in terminal emulator instead of an external emulator. Junegunn Choi, author of fzf, has already added experimental support for this feature, so you can try it out now if you’re curious!

It’s unlikely the terminal feature in Vim 8 will be compatible with the equivalent feature in Neovim. That’s bad news for users, for plugin authors, and for anyone writing a book about modern Vim.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.243.184