Welcome to the July 2022 release of Visual Studio Code, with some of the key highlights listed below for you.
More convenient title bar customization
For those of you using custom title bars (the default on Windows, macOS, and the web), you may have noticed that we're introducing more interactive content to the title bar. While there are already settings to hide these elements individually, you can now right-click on the title bar to access the context menu for the toggle menu bar (not shown on the macOS desktop), Command Center, and layout controls.
For Windows users expecting a system context menu, the menu can still be triggered by right-clicking the VS Code icon in the upper-left corner of the window or pressing Alt+Space. The mouse position is used to determine the behavior when triggered with Alt+Space, so if the custom menu is at the top of the title bar, the custom menu will appear.
For Linux users, due to issue #156397 (the content of the issue can be viewed in the original article), the blank space in the title bar will not open the context menu. You must right-click on one of the items in the title bar that you want to hide.
Collapse selection
The command Create Manual Folding Ranges from Selection (Ctrl+K Ctrl+,) creates and folds folded ranges from the currently selected row. This area is called the manual folding area and is above the area computed by the folding provider. Manual folding ranges can be removed again with the command Remove Manual Folding Ranges (Ctrl+K Ctrl+.). Manually collapsing regions is very helpful in the case of programming languages that do not support collapsing.
Searching multiple selections The search view now supports multiple selections. Any action you perform on one result in the selection, such as dismiss or replace, will also be performed on the other selected items.
Tree View Search and Filter
Tree views, such as File Explorer, now support the Find control, which pops up by pressing Ctrl+F in the tree. You can use the Find control to highlight matching elements, or toggle the Filter button to hide all elements that do not match the search term.
Terminal improvements
Shell-integrated auto-injection was removed in the last preview release and is now enabled by default. Works fine for supported shell settings (most bash/zsh/pwsh configurations) without any changes.
Note: On Windows, you need PowerShell 7 (pwsh) to support shell integration. It can be installed via https://aka.ms/PSWindows .
If the shell integration doesn't automatically light up, you'll need to set up a manual install, which we've simplified in this release. To enable auto-injection when the terminal.integrated.shellIntegration.enabled setting is set to true, add this to your settings.json file to disable the feature:
"terminal.integrated.shellIntegration.enabled": "false"
Command Line Options: merge
You can now bring up the merge editor in VS Code using command line options:
-m --merge <path1> <path2> <base> <result> Perform a three-way merge by providing paths for two modified versions of a file, the common origin of both modified versions, and the output file to save merge results.
This allows you to use VS Code as a merge tool for Git. For example, if you configure in .gitconfig then:
[merge]
tool = code-insiders
[mergetool "code-insiders"]
cmd = code-insiders --wait --merge $REMOTE $LOCAL $BASE $MERGED
Python initial experience
Python extensions allow users to easily install Python when needed. Any interpreter-related prompts are only displayed if the user action requires the interpreter. Additionally, UI prompts have been improved to more accurately display errors and suggested changes.
Sticky scroll preview
UI can now be presented to show the extent the user is in during scrolling. The "sticky scroll" UI will show the class/interface/namespace/function/method/constructor at the top of the editor to help you understand where in the document. Use the editor.experimental.stickyScroll.enabled setting to enable sticky scrolling.
Developing a container CLI theme
The Development Container Command Line Interface (CLI) topic has been updated for the latest version of the CLI. The Development Container CLI allows you to build and run development containers and is an open source reference implementation of the Development Container Specification.
For more updates of Visual Studio Code 1.70, please scan the QR code or click the link below.
Long press to identify the QR code
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。