

The 'Various Methods' Category of ES6 Snippets (source: Visual Studio Marketplace) Other developers have also expressed interest in contributing to the open source project - specifically with support for JSX, used in React - which is hosted on GitHub.

Although first published a couple years ago, Karypidis has been steadily maintaining it, adding new features such as support for HTML files - requested by users - in the recent version 1.4.0.

The snippet package - which supports both JavaScript and TypeScript - has been installed more than 415,000 times and has a rating of 4.6 out of 5. To help you quickly take advantage of new features such as classes, arrow functions, promises and many more, developer Charalampos Karypidis has published JavaScript (ES6) code snippets: "Code snippets for JavaScript in ES6 syntax." Yes, small code snippets are available in their own extension category, along with others such as languages, debuggers, formatters and so on.Īs VS Code is a cross-platform tool that runs on Windows, Linux and macOS - and JavaScript is becoming the programming lingua franca for all kinds of cross-platform projects, I've sorted out some of the most useful JavaScript snippets available in the marketplace, based on the number of downloads, ratings and plain old subjective assessment.Īs JavaScript evolves in a series of new versions, the Sixth Edition of the ECMA-262 standard, otherwise known as ECMAScript 2015 or ES6 is a hot topic, with many features being adopted by major browsers. So why not just fire up the Visual Studio Code Marketplace and quickly install just what you need from the " Snippets" section? In coding, as in life, there's very little new under the sun - as programmers who keep a Google search tab open and make extensive use of Stack Overflow well know. Sometimes you just want to quickly insert smaller code blocks that perform useful - and repeatable - tasks, such as loops or conditional statements.Īnd if you're looking for such a quick-hit injection of productivity, chances are quite good that someone has already written it and packaged it for others to use. Sometimes, however, you don't need all of the functionality provided by, say, the popular Python extension (more than 2.2 million installs) that provides rich support such as linting, IntelliSense, code formatting and so on. Visual Studio Code is a great, free, cross-platform, open source code editor with an extensive library of prebuilt extensions for all kinds of useful, add-on functionality.
