Newsletter #5 - Out of the Box

April 2015

Outstanding communication and handling of bugs from Neovim. Exemplary FOSS project in my experience so far. @telemachus

Welcome to the fifth newsletter for Neovim, the project that looks to become Vim out of the box.

General News

Gitter.im for Neovim

Now in addition to the mailing list and IRC channel, you can hop into the Neovim chat room provided through Gitter.im. It has a convenient web interface but also allows you to connect using your favorite IRC client.

Black Duck 2014 Open Source Rookie

Black Duck, a company that helps other corporations in the adoption of open source software, chose Neovim as one of the projects to feature this past year. The company annually recognizes some of the top new open source projects that started during the year.

ICCF Holland Donations

As mentioned in the last newsletter, Unixstickers has added Neovim stickers to their inventory. Every sticker that is bought increases the amount donated to ICCF Holland, Bram Moolenaar’s charity.

Since they’ve been added, USD 106 has been raised which Unixstickers just donated on March 24th.

The Neovim Wiki contains a page titled Related projects that contains a list of current GUI projects, API clients, plugins that take advantage of Neovim features, and projects with direct support for Neovim.

Some of the projects might be experimental which means there might be bugs and the projects might still be in progress.

Do you know of another project that can be listed? Don’t be afraid to add a link yourself!

Development News

Terminal UI (TUI)

@tarruda has merged his pull request to reimplement the terminal user interface using libtermkey and unibilium.

Libtermkey is a library by @leonerd that “allows easy processing of keyboard entry from terminal-based programs.” It has the ability to handle special keys, UTF-8 combining and more.

Unibilium is a library by @mauke that interfaces with terminfo. Terminfo is a library and database that makes it easy to interface with display terminals without worrying about device specific details. More details can be found on the man page for terminfo by running: man 5 terminfo.

Although the TUI implementation is included as part of Neovim, it is architecturally decoupled from the editor core: it uses the same API as external clients and GUIs.

Additional Keybindings

As a result of using libtermkey, Neovim can now bind meta keys and Ctrl-Shift combinations both of which weren’t previously possible in the terminal. Be sure to read more about the updated binding capabilities for additional examples and possibilities.

Builtin Terminal Emulation

@tarruda has finished his pull request adding a new :terminal command which when ran launches a full terminal emulator. The terminal is using Neovim’s native buffers and windows which means the user can enter normal mode by pressing <C-\><C-n>.

This is meant to replace and provide more capabilities than the already existing Vim command, :shell, which has been removed from Neovim. More explanation on the decision of this feature can be found in this comment made by @tarruda.

The complete documentation for this feature can be found under :help nvim-terminal-emulator.

This feature is implemented using another of @leonerd’s projects called libvterm.

True Colors

With the changes to the TUI described above, this allowed @tarruda to make a pull request to add true colors to supporting terminals.

A more detailed explanation of what true colors means as well as terminals that support it can be found in this Gist that was written by @XVilka.

To enable true color support, set the environment variable NVIM_TUI_ENABLE_TRUE_COLOR.

Windows Build

The progress of building Neovim on Windows was first detailed in the July 2014 newsletter.

In a huge milestone, @equalsraf has been able to build Neovim on Windows and also has a build on AppVeyor, a continuous delivery service specifically for Windows.

@equalsraf has provided detailed notes on the requirements, building the dependencies/Neovim, and known errors.

Going forward, @equalsraf is still working on his main pull request while @justinmk has started a new issue for collecting requirements and discussion.

Special Interfaces Cleaning

Vim has a number of ways to start it through its many aliases. The complete list can be found under the starting section in Vim’s documentation.

@Pyrohh opened an issue to discuss the removal of such aliases. All of the aliases had corresponding flags that could be used instead.

After some discussion it was decided to remove the lesser used ones. @Pyrohh then made a pull request to remove the following:

  • ex: Ex mode.
  • exim: “Improved” Ex mode.
  • view: Read-only mode.
  • gvim: Using the GUI.
  • gex: GUI and in Ex mode.
  • gview: GUI and in read-only mode.
  • rvim: Restricted mode.
  • rview: Read-only and in restricted mode.
  • rgvim: GUI and in restricted mode.
  • rgview: GUI, read-only, and in restricted mode.

In addition, @Pyrohh made another pull request to merge vimdiff and vim -d.

Removal of “Easy Mode”

@fmoralesc also opened a pull request to remove evim. Which given by the docs says it starts in insert mode which allows it to act like a normal editor.

Even with removing of the feature, emulating it is still possible by using the underlying 'insertmode' option that easy mode leveraged.

State of the GUI

The graphical side of Neovim has been seeing some changes in addition to the terminal interface in one of the above section.

Since the last newsletter, the following projects in no particular order have been created:

New Tab Events

Three new autocommand events have been added by @fmoralesc in this pull request. An autocommand event is a way to execute something in response to a particular event. Events are particularly useful in plugins.

The new events are: TabNew, TabNewEntered, and TabClosed.

Major Change to Improve Job API

@tarruda is continuing to refine the new job API. His work has continued in this latest pull request. This might be a breaking change for existing plugins that use the existing job API.

This improvement is to make use of function callbacks (for input, output events) instead of the previous way of using autocommands for responding to events.

In addition to that, there are more job control functions in VimL including jobwait() and jobclose().

So Long long_u

In an epic crusade against Vim specific integer types that has spanned two previous newsletters (June and November), @elmart has finished removing the integer type long_u. @elmart’s changes were broken up into three last pull requests (1, 2, 3).

This is a step towards @tarruda’s goal to remove all project specific types. All that remains is char_u in which there are ~12,300 occurrences currently in use.

Adding a EndOfBuffer Highlight Group

@mhinz wanted a way to remove ~ after the file ends. He proposed a new :highlight group, called EndOfBuffer, to go with the current list of groups.

His proposal was first sent as a patch to vim-dev where his changes were accepted by Bram and should make it into Vim in the future. @mhinz let @fmoralesc prepare the pull request to bring in the changes to Neovim. The pull request has since been merged into the master branch.

Garbage Collection Performance

When using Vim with plugins that allocate a large number of objects there are times when the garbage collection will kick in and cause Vim to hang due to the time spent looking for objects to free.

This issue was posted to vim_dev by Yasuhiro Matsumoto. A patch as written by Ariya Mizutani and proposed to the mailing list which improves the algorithm for looking through the objects. In Yasuhiro’s test case, it took unpatched Vim 100 seconds to execute but took just 0.134 seconds when the patch was applied.

An issue by @Shougo was created to discuss this patch being applied to Neovim. @oni-link then created a pull request to apply the patch which was merged shortly after.

Vimexpect and Example GDB Plugin

@tarruda created a small Vimscript library in a pull request that mimics Tcl’s Expect for Neovim.

The purpose of Expect (in Tcl) is to make it easy to script and automate text based applications that don’t provide that functionality.

@tarruda provided an example plugin for GDB as a proof of concept. The plugin was created to make it easier to develop Neovim and show the vimexpect possibilities.

Options Updates

Removal of compatible

Vim has a compatible option which lets Vim be more compatible with Vi. It can also be started by running vim -C.

In December, @klusark made a pull request to change nocompatible, which turns on no compatibility mode with Vi, to always be set.

This means that set nocompatible and the flag -N are non-operations. This also means that since there isn’t a compatible mode, if you run set compatible it will give an error.

Removal of edcompatible

An issue was created to discuss the removal of the edcompatible option. Turning on this feature gives special behavior for the g and c flags for the :substitute command. Vim’s documentation actually discourage the use of this option.

@Pyrohh created a pull request to remove the feature and it was merged into the master branch.

Removal of ttyfast

Vim has an option called ttyfast which is set if there exists a “fast terminal connection”. When set, it will send more characters to be drawn instead of using insert/delete line commands.

Discussion started and it was agreed that the option should be set as the default back in August. Shortly after, @fornwall created a pull request to make it the default.

After a few months of it being the default and no issues arising, @Pyrohh created a pull request to remove it completely.

Simpler Handling of Always-on/Always-off Options

Since the following three options were removed and more might follow, @fwalch created a pull request to simplify how these always-on/always-off options are handled.

Upstream Vim Patches

Neovim continues to merge in the upstream Vim patches that are submitted to the Vim mailing list.

Since the last newsletter, more than 60 pull requests worth of patches have been submitted to Neovim. The current status of all the patches can be found on the Vim patch report.

Helping Out

Donating

If you’d like to help support development, you may donate using Bitcoins here: 1Evu6wPrzjsjrNPdCYbHy3HT6ry2EzXFyQ or back the team on the Neovim Bountysource page.

Contributing

If you are an experienced developer or inexperienced but wanting to learn, visit the GitHub repo and check out the README, CONTRIBUTING guide, and finally the Wiki to learn more.

There are plenty of opportunities to help out and plenty of things to do.

That’s a Wrap

Do you have any feedback or suggestions regarding this newsletter? Feel free to reach out through the Neovim Twitter.

This newsletter cannot cover all of the contributions and support of the community. Thanks to all of the other contributors that have helped in some way during the months since the last newsletter.

Be sure to subscribe to the RSS feed to stay up-to-date on what is happening in the Neovim world. The next newsletter will be released in a few months time.

Until next time. :wq

News

Find more updates in the news archive.

What is Neovim?

Neovim is a Vim-based text editor engineered for extensibility and usability, to encourage new applications and contributions.

Visit the gitter channel or IRC to chat with the team.

Twitter

RSS

RSS clients can follow the RSS feed.