April 2018 (version 1.23)
Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. April 2018 (version 1.23) Update 1.23.1 : The update addresses these issues . Downloads for 1.23.1 Windows x64 macOS Intel Linux 64-bit .deb .rpm .tar.gz Linux 32-bit .deb .rpm .tar.gz Welcome to the April 2018 release of Visual Studio Code. This milestone the VS Code team has been focused on API work to support extension authors, but there are still plenty of updates in this version that we hope you will like.
Some of the key highlights include: Highlighted indent guides - Helps visualize source code indenting. Run Code Actions on save - Run actions like Organize Imports when you save. NPM script explorer - Quickly find, run, and debug NPM scripts in your project. Problems view filtering - Choose which files will display errors and warnings. Middle mouse button column selection - Middle mouse button with drag for fast column selection.
CSS region folding - Create regions in your CSS/SCSS/Less code for helpful code folding. Improved CSS new property support - Smart suggestions for CSS experimental properties. Markdown header search - Search for Markdown headers across your entire workspace. Custom Activity Bar views - Extension authors can create their own Activity Bar items. New deploy website tutorial - Learn how to deploy a static website to Azure Storage.
If you'd like to read these release notes online, go to Updates on code.visualstudio.com . You can also check out this 1.23 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 - Better Unicode file support, more stable editor positioning. Workbench - Copy search results, better Git clone workflow, VS Code process explorer.
Debugging - Logpoint expressions support smart completions and displaying structured objects. Languages - JavaScript/TypeScript Organize Imports action, persistent Markdown previews. Extension Authoring - New webview and FileSystem Provider APIs, 'Source' file level actions. 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 Highlighted indent guides VS Code can now highlight the active indent guide, as you move your cursor between various source code blocks. The highlight color name is editorIndentGuide.activeBackground , which you can modify in the workbench.colorCustomizations setting: "workbench.colorCustomizations" : { "editorIndentGuide.activeBackground" : "#ff0000" } Run Code Actions on save The new editor.codeActionsOnSave setting lets you configure a set of Code Actions that are run when a file is saved.
For example, for JavaScript, TypeScript, and other extensions that contribute an organize imports Code Action, you can enable organize imports on save by setting : "editor.codeActionsOnSave" : { "source.organizeImports" : true } You can also enable or disable which Code Actions are run on save per language using a language specific setting . The following settings enable organize imports on save for TypeScript files only: "[typescript]" : { "editor.codeActionsOnSave" : { "source.organizeImports" : true } }, "[typescriptreact]" : { "editor.codeActionsOnSave" : { "source.organizeImports" : true } } Column selection using middle mouse button In VS Code, column (box) selection can be added by holding Shift and Alt and then using the left mouse button.
Now the middle mouse button can also be used to create a column selection: Note: When setting editor.multiCursorModifier to ctrlCmd , the modifiers are Shift and Ctrl on Windows and Shift and Cmd on macOS. Improved handling of UTF-16 encoded files VS Code always supported the UTF-16 encoding for files but required a BOM (byte order mark) to properly detect this encoding. If VS Code didn't find a BOM, the file would not be opened and the user saw an information message.
With this release, we added a new action to this message to open the file as text in the editor: Once opened, you can then change the encoding to try to decode the text. In addition, VS Code now uses a heuristic that tries to detect UTF-16 without a BOM automatically. This heuristic should work for all UTF-16 files that contain only ASCII characters. Improved editor positioning In certain cases when changing the editor scroll height (such as resizing a wrapped editor, using mouse wheel zooming, or modifying a CodeLens), the editor would attempt to maintain the centered line in the viewport.
VS Code now maintains the first line in the viewport, providing a more stable appearance. Workbench Problems view filtering You can now include or exclude files in the Problems view using filters. Use glob patterns in the filter input box to include/exclude files. An exclude pattern must be prefixed with ! . For example, !*.js will remove all files that have a .js extension. There is a Filter using Files Exclude Setting button to remove all files matching your files.exclude setting.
The short video below shows filtering the project out directory based on the files.exclude setting and ignoring all node_modules by typing !**/node_modules/** in the filter input box: NPM script running With the setting npm.enableScriptExplorer , you can enable an explorer that shows the scripts defined in your workspace. The explorer supports: Open a script inside a package.json file or the scripts section when the package.json file is selected.
This is the default action when selecting a script. Run a script as a task with the output shown in the Integrated Terminal. Debug a script. To launch the node debugger, the script needs to define a node debug option like --inspect-brk ( see also ). Use the npm.exclude setting to exclude scripts in package.json files contained in particular folders. Git clone improvements There have been several improvements to the Git clone workflow.
When running the Git: Clone command: A native dialog is used to pick the repository location. The new notification progress API is used, improving the operation status reporting. VS Code will prompt you whether you'd like to add the cloned repository to your workspace or open it directly. The Git extension also adopted the new proposed API to handle system-wide URIs and invokes Git clone on specific URIs. Here's an example URI which clones https://github.com/microsoft/vscode-vsce.git : vscode://vscode.git/clone?url =https%3A%2F%2Fgithub.com%2FMicrosoft%2Fvscode-vsce.git If you'd like to try this out: Windows: In a Command Prompt, type: explorer "vscode://vscode.git/clone?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fvscode-vsce.git" . macOS: In a shell, type: open vscode://vscode.git/clone?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fvscode-vsce.git .
Copy results from search context menu The search results tree context menu includes three new options: Copy , Copy Path , and Copy All . This was a highly 👍'd request which will make it easier to share or export your search results. Return of the separate search include and exclude input boxes Last month, we merged the include and exclude input boxes in the Search view in an attempt to simplify and streamline it, while also saving a little vertical space.
However, we heard from many of you that this didn't fit with the way you were using the Search view. Eventually, we decided to simply revert the change and so with this release, we are back to having separate include/exclude boxes as we had before 1.22. Note that you don't need to use ! on patterns in the exclude box. Custom Activity Bar views Extension authors can now add their own view containers to the Activity Bar.
Depending on your installed extensions, after an update you may see UI such as custom explorers move from the File Explorer to a new custom view container. For example, below you can see that the explorers from the Azure App Service and Azure D
The rest of this page is on the live site.