用户:
datacat查看:0 回复:1 评论:0 创建时间:2020-06-13T14:54:37
Workbench Switch tabs using mouse wheel
When you use the mouse wheel to scroll over editor tabs, you currently cannot switch tabs, only reveal tabs that are out of view. Now with a new setting workbench.editor.scrollToSwitchTabs, you can change the behavior to switch the active editor tab.
Below when the cursor focus in the editor tab region, if the user scrolls their mouse wheel, the active editor changes.

Note: You can also press and hold the Shift key while scrolling to get the opposite behavior (for example, you can switch editor tabs even when the scrollToSwitchTabs setting is off).
A new setting window.titleSeparator lets you change the separator character that is used in the window title. By default, a dash '-' is used.

We've updated the styling of the Side Bar section headers for our default Dark and Light themes. We now use a transparent background and show a border for each header.
Below the OPEN EDITORS section header does not have a background color and the VSCODE and OUTLINE headers have an upper border.

Syntax Highlighting in VS Code runs by interpreting Text Mate Grammars. These grammars are authored with regular expressions written in a particular dialect and can be evaluated using the oniguruma regular expression library. Up until now, we have been using two distinct libraries for evaluating such regular expressions, one for VS Code desktop (a native node module), and another one for VS Code in the browser (a Web Assembly binary).
We have now written a dedicated Web Assembly binding that is optimized for usage by our TextMate interpreter. By avoiding memory allocations in inner loops and adopting new APIs added just a few months ago to oniguruma, we have been able to create a variant that is faster than both of the previous approaches and delivers up to 3 times faster performance for highlighting regular programming files. You can review pull request #95958more details and measurements.
Semantic token stylingYou can now customize semantic theming rules in your user settings. Semantic coloring is available for TypeScript and JavaScript, with support for Java and C++ under development. It is enabled by default for built-in themes and is being adopted by theme extensions.
The editor.semanticTokenColorCustomizations setting allows users to override the default theme rules and to customize the theming.

The setting above changes the Default Dark+ theme. It gives a new style to parameters (italic and a new color) and underlines all symbols from a default library (for example, Promise, Map, and their properties).
The example below adds semantic styling to all themes:
Theming for semantic tokens is explained in more details in the Semantic Highlighting Guide.
New color for constants in the Default Dark+ themeThe Default Dark+ and the Default Light+ themes now color constants in a different shade than writable variables.
Below notice that the htmlMode and range constants are a different color than the result variable.
Default Dark+ theme:

Default Light+ theme:

Last milestone, changed the Undo/Redo stack to be persisted when you close a file and reopen it. Not everyone wanted this new feature, so there is now a setting, files.restoreUndoStack, to disable persistent Undo.
The following commands have been removed:
workbench.action.terminal.deleteWordLeftworkbench.action.terminal.deleteWordRightworkbench.action.terminal.deleteToLineStartworkbench.action.terminal.moveToLineStartworkbench.action.terminal.moveToLineEndThese commands worked by sending a particular character sequence to the terminal, which was a best effort guess based on what command keybindings terminals use. The problem with these commands was that they were a black box, you needed to literally search through the vscode codebase to figure out how they worked. They have been replaced with custom keybindings for the workbench.action.terminal.sendSequence command, which does the same thing in a generic way.
These are advanced keyboard shortcuts and cannot be viewed in their entirety via the Keyboard Shortcuts UI as they contain arguments but you can view their JSON definitions by running the Preferences: Open Default Keyboard Shortcuts (JSON) command:

This should also help you learn how to use the powerful sendSequence command.
Support for pasting of multi-line text in PowerShellMulti-line pasting never worked in PowerShell as VS Code always sent over the text in exactly the same way as typing it out. As explained above, several keybindings have been swapped to use the workbench.action.terminal.sendSequence command and you might have noticed a new keybinding was added for Windows only:
This new keybinding will send the text representing Ctrl+V directly to PowerShell, which gets picked up by PSReadLine and handled properly.
Before:

After:

Theme: Sapphire (Dim)
Control double-click word selectionThe new terminal.integrated.wordSeparators setting lets you customize the separator characters used to delimit a word when you double-click in the terminal.
The default separators are:
、