March 2018 (version 1.22)
🎬 Watch The Story of VS Code! VS Code is now on Instagram, follow @vscode.ig for updates, tips, and more. Rewatch GitHub Copilot Day. March 2018 (version 1.22) Update 1.22.2 : The update addresses these issues . Downloads: Windows | Mac | Linux 64-bit: .tar.gz .deb .rpm | Linux 32-bit: .tar.gz .deb .rpm Welcome to the March 2018 release of Visual Studio Code. There are a number of significant updates in this version that we hope you will like, some of the key highlights include: Syntax aware code folding - Adds improved folding for CSS, HTML, JSON, and Markdown files.
Cross file error, warning and reference navigation - Move quickly around your workspace. New Hint suggestions - Makes it easy to spot suggested fixes or refactorings in the editor. Convert to ES6 refactoring - New Code Actions to convert to ES6 classes and modules. Auto attach to process - Automatically attach the debugger to running Node.js processes. Logpoints - Inject logging without changing source code or restarting your debug session.
Better large file support - Faster syntax highlighting and easily increase memory for very large files. Multiline links in the terminal - Paths and URLs can span lines in the Integrated Terminal. Emmet wrap preview - Live preview for Emmet's wrap with abbreviation functionality. Improved updates on Windows - Automatically updates in the background for less downtime. Preview: Organize JS/TS imports - Remove unused and sort remaining imports.
If you'd like to read these release notes online, go to Updates on code.visualstudio.com . You can also check out this 1.22 release highlights video from Cloud Developer Advocate Brian Clark . The release notes are arranged in the following sections related to VS Code focus areas. Here are some further updates: Editor - Emmet performance and smart matching improvements, new snippet Date variables. Workbench - Smoother scrolling on Windows, automatic save during Search and Replace.
Debugging - Improved Node.js process picker, postDebugTask in launch.json. Tasks - Better command and argument quoting and escaping support. Languages - Easier IntelliSense in JSDoc, CSS path completion. Extension Authoring - Long running operations with cancellation, add related information to diagnostics. Insiders: Want to see new features as soon as possible? You can download the nightly Insiders build and try the latest updates as soon as they are available.
Editor Syntax aware folding Folding ranges in HTML, JSON, Markdown, CSS, LESS and SCSS are now, by default, computed based on the language's syntax and no longer rely on well-formed indentation. Support for TypeScript and JavaScript is also available, and can be enabled by the setting "typescript.experimental.syntaxFolding": true . If you prefer to switch back to indentation based folding for one (or all) of the languages above, use: "[html]" : { "editor.foldingStrategy" : "indentation" }, Tip : See how this feature is used for collapsing header regions in Markdown files .
A new API for extensions is proposed so that also other languages can provide their syntax aware folding providers. Error and reference navigation across files With this release, navigating errors and warnings via F8 ( Go to Next Problem ) takes all reported errors into account. Instead of looping inside just one file, it will take you to the next file with errors and back. Similarly, there is a new command to navigate to reference search results.
Trigger Find All References on a symbol and now use F4 and ⇧F4 (Windows, Linux Shift+F4 ) to visit each reference. This is great to make edits in all places that reference a symbol because your fingers don't need to leave the keyboard. Hints in the editor The extension API now supports creating 'Hint' diagnostics. They aren't errors or warnings but suggestions how something could be made better, for example, by running a certain refactoring.
We render hint diagnostics with an ellipsis ... under the start of the word in question. It is a good practice for extension authors to always include a hint with a Code Action as hint diagnostics can help advertise the Code Actions. However, some users might not want to display hints in the editor so also include support for disabling them. Tip : In this release, we have added several hints for JavaScript/TypeScript refactorings .
Related information in errors and warnings The extension API now supports adding related information to diagnostics and this is shown in all places where diagnostics are shown: on hover, the error Peek window, and Problems Panel . In the example below, you can see related information pointing out the first location where a twice assigned variable was used: Easier way to open large files Previously, opening large files (~2GB+) in the editor would prompt you to relaunch from the command line with the flag --max-memory=NEWSIZE .
To reduce this friction, when you try to open a file which requires more memory than the application is currently allowed to use, a new notification will appear that lets you quickly relaunch with more memory available to the application. The maximum memory available after relaunch is configurable with a new setting files.maxMemoryForLargeFilesMB and defaults to 4096 (4GB). Syntax highlighting optimization With this release, we will do syntax highlighting for the viewport immediately after a file is opened, based on the scope of the content in the viewport.
This results in much faster colorization as you can see below when the user opens a new file with the Go to Definition command. Left : VS Code 1.21 Right : VS Code 1.22 Find and Replace improvements for large files We shipped a new text buffer implementation in last release (read our blog post for more information), and we continued the optimization for Find and Replace for large files. Configurable Format On Save timeout VS Code can run formatters just before saving a file to disk and so speed matters because a slow extension could slow down saving.
For that reason, VS Code is very strict about saving and cancels a format-on-save-request after 750ms. For some extensions, especially when dealing with large files, that's not enough time, and so we have added a new setting "editor.formatOnSaveTimeout" to configure the timeout. If a language extension knows that it will need more time for formatting, it can modify the timeout as a default language specific setting . In order to monitor saving, there is now a progress indicator on the Status Bar.
More snippet variables There are new snippet variables for referring to the current date and time. In addition to numbers, for example, 28/3/2018, you can now use names like '28 of March'. The new variables are: ${CURRENT_DAY_NAME} - The name of the day ('Monday'). ${CURRENT_DAY_NAME_SHORT} - The short name of the day ('Mon'). ${CURRENT_MONTH_NAME} - The full name of the month ('July'). ${CURRENT_MONTH_NAME_SHORT} - The short name of the month ('Jul').
Emmet Wrap with Abbreviation preview When using either the Emmet: Wrap with Abbreviation or Emmet: Wrap Individual Lines with Abbreviation commands, you can now see a preview of what the wrapped text will look like. Faster abbreviation expansion Expanding Emmet abbreviations in large CSS/SCSS/Less files is much faster now. This is achieved by parsing only a small region around the cursor instead of the complete file when trying to determine whether the current location is valid for expanding Emmet abbreviations.
Smarter snippet matching Emmet abbreviations in stylesheets are fuzzy matched with pre-defined snippets to give you the closest matched result. You can control the fuzzy matching accuracy by changing the css.fuzzySearchMinScore setting in emmet.preferences . css.fuzzySearchMinScore sets the minimum score a snippet needs to be considered a match. Increasing the score will result in fewer but more accurate matches. The default value is 0.3 and you can provide any value between 0 and 1.
"emmet.preferences" : { "css.fuzzySearchMinS
The rest of this page is on the live site.