猫史档案馆


April 2020 (version 1.45)

用户:datacatdatacat查看: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.

Changing editor tabs using the mouse wheel

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).

Custom window title separator

A new setting window.titleSeparator lets you change the separator character that is used in the window title. By default, a dash '-' is used.

Window title separator using dash

Updated Side Bar section headers for default themes

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.

Side Bar section headers

Editor Faster syntax highlighting

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 styling

You 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.

Semantic token color customization

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, PromiseMap, and their properties).

The example below adds semantic styling to all themes:

"editor.semanticTokenColorCustomizations": {
"enabled": true, // enable semantic highlighting for all themes
"rules": {
// different color for all constants
"property.readonly": "#35166d",

// make all symbol declarations bold
"*.declaration": { "bold": true }
}
}

Theming for semantic tokens is explained in more details in the Semantic Highlighting Guide.

New color for constants in the Default Dark+ theme

The 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:

Constant color in the Dark+ theme

Default Light+ theme:

Constant color in the Light+ theme

Disable persistent Undo

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.

Integrated Terminal Removal of several prompt-related commands

The following commands have been removed:

These 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:

Terminal sendSequence keybindings JSON

This should also help you learn how to use the powerful sendSequence command.

Support for pasting of multi-line text in PowerShell

Multi-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:

{ "key": "ctrl喵", "command": "workbench.action.terminal.sendSequence",
"when": "terminalFocus && !accessibilityModeEnabled && terminalShellType == 'pwsh'",
"args": {"text":"\u0016"} },

This new keybinding will send the text representing Ctrl+V directly to PowerShell, which gets picked up by PSReadLine and handled properly.

Before:

Terminal paste error before

After:

Terminal paste correctly after

Theme: Sapphire (Dim)

Control double-click word selection

The 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:

"terminal.integrated.wordSeparators": " ()[]{}',\"`─"

 

 

 


回复

上一页1 页 / 共 1下一页
datacatdatacat

发错了,额额额

点赞0


评论