This article is more than 1 year old

VS Code acknowledges its elders: Makefile projects get an official extension – and VIM mode is on the backlog

Updates for modern code editor hark back to 40-year-old tools

Makefile projects, widely used in open source development, are getting an official Microsoft extension in Visual Studio Code (VS Code), and a request for built-in VIM support is on the official backlog.

Makefiles are text files containing instructions for make, a build automation tool originally written by Stuart Feldman at Bell Labs in 1976 but rewritten many times since.

Building C or C++ projects with Make is old school, and makefiles seem arcane at first but they have advantages. “We chose make, and you should too, over other agnostic build tools because of its rather simple language and its ubiquitous availability,” said Trivago software engineer Simon Bruggen, for example.

Makefiles are part of the magic behind the three commands every Linux tinkerer knows - ./configure, make, make install – and still widely used in open source projects.

This being the case, Microsoft has created a new VSCode extension for makefile support, now in preview. The extension gives developers shortcuts for make commands, and the ability to set a script to preconfigure terminal operations before running make. Microsoft has provided configurations for around 70 projects including ffmpeg, git, Mono, Node, PHP, PostgresSQL and also for make itself.

Make is not difficult to use from the VS Code terminal with or without this extension but the fact that Microsoft has chosen to do this shows the continuing importance of this 40 year old utility.

Some might imagine that VS Code is a welcome alternative to vi, a command line editor for Unix which is approximately the same age as make, first written by Bill Joy in “probably 1976” according to this archived interview. Vim, or Vi IMproved, dates from the nineties and typing vi in a Unix-like operating system will normally bring it up. Ubiquity is an asset, so too is the power of its modal interface.

“Suddenly you realize you want to copy the current line and paste it directly below the first. How do you do this? Tell me your process step by step, and let’s count the keystrokes it takes to accomplish this,” wrote developer Luke Maciak back in 2012, challenging the reader to beat vim’s three (y y p). Maciak also noted that “it is not what you would call a user-friendly piece of software”, but once its keystrokes are familiar, it is highly efficient. Modality, which distinguishes between commands and text entry, is a sensible way to control an editor.

There are, therefore, plenty of developers who would like VS Code to be more like vim, one of whom opened this feature request for “VIM mode like Sublime” (Sublime being another popular code editor). It soon won over 800 upvotes and has been automatically added to the Visual Studio code backlog. This does not guarantee that it will be implemented. “If and when a Backlog item is scheduled for a concrete iteration depends on how well the issue aligns with our Roadmap”, the team wrote in its guide to issues triaging.

There are also objections: VIM extensions already exist, and “I'd rather have a lean and mean VSCode that I can extend as necessary than a monolithic one that has tons of features I'll never use,” said another user.

The problem though is that implementing vim keystrokes as an extension has performance issues that can impact VS Code and its other extensions. “If I turn vim plugin on (all other plugins off), vscode starts to lag,” wrote says a user. There is an architectural issue, in that VS Code is carefully designed to keep extensions somewhat isolated. “We decided to run extensions in a separate process so that the VS Code core is less impacted by extensions,” said VS Code inventor Erich Gamma recently. This is generally a good thing, but it is sub-optimal for an extension like hooks into every keystroke, particularly if it is competing with other extensions. It does not look like there will be an easy solution.

Not everything in the VS Code world is retro. Microsoft program Manager Jeffrey Mew has posted about Python improvements in the February update, including integration with TensorBoard for visualising machine learning models, improved readability for docstrings (documentation embedded into Python code), and streamlined code navigation for “go to definition”, and “go to declaration.”

VS Code has huge number of open issues, more than 4,400. Every developer wants a favourite feature added, but none of them wants a bloated or slow editor as a result. The problems with vim mode illustrate how challenging that can be. ®

More about


Send us news

Other stories you might like