January 2020 (version 1.42)
Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. January 2020 (version 1.42) Update 1.42.1 : The update addresses these issues . Downloads for 1.42.1 Windows x64 macOS Intel Linux .deb .rpm .tar.gz Snap Welcome to the January 2020 release of Visual Studio Code. There are a number of updates in this version that we hope you will like, some of the key highlights include: Rename preview - See pending renames in a diff view and easily accept or reject changes.
Open editors limit - Set the maximum number of editors open at one time. Panel placement - Move the panel (Output, Terminal) to the left, right, or below the editor. Folded code highlighting - Quickly find folded regions with new background highlight. Debug Console improvements - Syntax highlighting, bracket matching, input history. Define global tasks - Per user tasks can be used across all your folders and workspaces.
Java extension updates - Java support for Data Breakpoints and Call Hierarchy view. Remote Development - New Forwarded Ports view for mapping SSH and Containers ports. New Containers tutorials - Learn how to create and deploy Docker containers. Preview features - First looks at the Timeline view, Search editor, semantic highlighting, and more. If you'd like to read these release notes online, go to Updates on code.visualstudio.com .
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. And for the latest Visual Studio Code news, updates, and content, follow us on Twitter @code ! Workbench Rename preview Visual Studio Code now allows you to preview Rename changes. When renaming, you can confirm a new name via ⌘Enter (Windows, Linux Ctrl+Enter ) and see the Refactor Preview panel.
It displays pending changes in a diff editor and allows you to uncheck/check individual changes. Once the rename has been applied (or aborted), the diff editor and preview panel close, putting you back in the current editor. Theme: GitHub Sharp, Font: FiraCode Limit the number of open editors There are new settings to limit the maximum number of editors that are open at the one time. workbench.editor.limit.enabled : Enable this feature (off by default). workbench.editor.limit.perEditorGroup : Whether to apply the limit per editor group or across all groups. workbench.editor.limit.value : The maximum number of open editors (10 by default).
If enabled, VS Code will close the least recently used editor when you open a new editor. Below you can see the behavior when the limit is set to 3: Theme: Nord Note: Dirty editors (files with unsaved changes) are never automatically closed but still count in the total number of open editors. Untitled editor improvements Untitled editors in VS Code are text buffers that have not yet been saved to disk. You can leave them open for as long as you like and all text content is stored and restored between restarts.
Untitled editor titles In the past, untitled editors were given generic names such as Untitled-1 , counting upwards. In this release, untitled editors will use the content of the first line of the document for the editor title and include the generic name as the description: Theme: Nord Note: If the first line is empty or does not contain any words, the title will fall back to Untitled-* as before. Default language mode By default, untitled files do not have a specific language mode configured.
VS Code has a setting, files.defaultLanguage , to configure a default language for untitled files. With this release, the setting can take a new value {activeEditorLanguage} that will dynamically use the language mode of the currently active editor instead of a fixed default. In addition, when you copy and paste text into an untitled editor, VS Code will now automatically change the language mode of the untitled editor if the text was copied from a VS Code editor: Theme: One Dark Pro Note: If the untitled editor already has a language mode specified, pasting text will not change it.
Navigate most recently used editors With this release, there is now a list of most recently used (MRU) editors across all editor groups. An editor is considered recently used when it either opens as the active editor or becomes the new active editor if already opened. Once an editor is closed, it is removed from this list. One application of this list is the new edt mru picker that you can open through the new View: Show All Editors By Most Recently Used ( workbench.action.showAllEditorsByMostRecentlyUsed ) command: You can add keyboard shortcuts to quickly navigate in this picker without using the mouse.
For example, below is a keybinding so that Ctrl+Tab and Ctrl+Shift+Tab navigates across editors of all groups (instead of only within the active group as the default keybindings do): [ { "key" : "ctrl+tab" , "command" : "workbench.action.quickOpenPreviousRecentlyUsedEditor" , "when" : "!inEditorsPicker" }, { "key" : "ctrl+shift+tab" , "command" : "workbench.action.quickOpenLeastRecentlyUsedEditor" , "when" : "!inEditorsPicker" } ] If you want to navigate the list without using a picker, there are new commands: View: Open Next Recently Used Editor ( workbench.action.openNextRecentlyUsedEditor ) View: Open Previous Recently Used Editor ( workbench.action.openPreviousRecentlyUsedEditor ) To differentiate which editor navigation commands work with a picker and which ones don't, the behavior of some existing commands has changed.
Specifically, the Recently Used Editor in Group commands no longer use a picker: View: Open Next Recently Used Editor in Group ( workbench.action.openNextRecentlyUsedEditorInGroup ) View: Open Previous Recently Used Editor in Group ( workbench.action.openPreviousRecentlyUsedEditorInGroup ) For picker-based navigation use: View: Quick Open Previous Recently Used Editor in Group ( workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup ) View: Quick Open Least Recently Used Editor in Group ( workbench.action.quickOpenLeastRecentlyUsedEditorInGroup ) Moving the panel The panel, which holds the Output, Debug Console, Terminal, and Problems panes, can now be moved to the left side of the editor.
The command View: Toggle Panel Position ( workbench.action.togglePanelPosition ) was removed in favor of the following new commands: View: Move Panel Left ( workbench.action.positionPanelLeft ) View: Move Panel Right ( workbench.action.positionPanelRight ) View: Move Panel To Bottom ( workbench.action.positionPanelBottom ) Restore all windows on restart VS Code's setting for restoring windows on startup has changed to restore all windows by default.
If you want to go back to the previous behavior, configure "window.restoreWindows": "one" to only open a single window. Save conflict resolution VS Code has a built-in mechanism to show a notification when you try to save a dirty file that has been changed outside of VS Code or by another program (for example Git): The motivation is to inform you that saving will overwrite the contents on disk even though the file was changed after the file became dirty.
Selecting the Compare button lets you review your changes along with the version on disk and either overwrite or revert the file. In cases where you know that the changes on disk can be overwritten, there is now an Overwrite button directly on the notification. You can also configure files.saveConflictResolution globally, per workspace, or file type to disable this behavior altogether. The options are askUser (default) or overwriteFileOnDisk .
Handling slow save operations VS Code allows extensions to change a file's contents when saving files to disk. Features like Format on Save and Fix on Save are examples. However, saving is a critical operation and extensions doing processing during a save must finish quickly so that the actual save operation can proceed. "Quickly" used to be enforced by VS Code, where VS Code would
The rest of this page is on the live site.