version 1.26
# September 2018 (version 1.28) (opens new window)
Welcome to the September 2018 release of Visual Studio Code. During this housekeeping milestone, we addressed several feature requests and community pull requests (opens new window) also resulted in new features. Here are some of the release highlights:
- Custom file icons (opens new window) - VS Code file icons reflect file type in your OS explorer.
- Project level snippets (opens new window) - Tune your snippet collection per workspace.
- Editor Tab completion (opens new window) - Use Tab to easily cycle through IntelliSense suggestions.
- Jump to last edit (opens new window) - New command to go to the location of your last edit.
- Save without formatting (opens new window) - Save a file without changing the existing formatting.
- Git improvements (opens new window) - Better delete conflict handling, new rebase on sync option.
- Rename via import path (opens new window) - Rename a JS/TS file through its import path.
- Convert to async refactoring (opens new window) - Quickly update a function to use async and await.
- Better Markdown folding (opens new window) - Collapse code blocks, multiline lists, and embedded HTML.
# Project level snippets (opens new window)
Snippets can now be scoped to a project and shared with your team. Simply use the Preferences: Configure User Snippets command or create *.code-snippets
file in the .vscode
folder. Project snippets work just like other snippets, they show up in IntelliSense and in the Insert Snippet action where they now have their own category.
Snippets also now support multiple prefixes. If you cannot decide if your copyright header snippet should be prefixed as header
, stub
, or copyright
, you can have them all. Simply use a string array as the prefix
property.
{
"prefix": ["header", "stub", "copyright"],
"body": "Copyright. Foo Corp 2028",
"description": "Adds copyright...",
"scope": "javascript,typescript"
}
2
3
4
5
6
# Record and search keyboard shortcuts (opens new window)
In the Keyboard Shortcuts editor (⌘K ⌘S), you can now search for keybindings just by typing keystrokes instead of typing out the key name (example 'shift'). Turn on the Recording Keys mode and type the keystrokes you want to search for.
You can also enter into the Recording Keys mode using ⌥⌘K. Press the Esc
key to exit from Recording Keys mode.
# Give focus to a custom view (opens new window)
You can now use a command to give focus to a custom view. There is a separate command provided for each custom view.
# Tab completion (opens new window)
Editor Tab completion can now complete all kind of suggestions. After setting "editor.tabCompletion": "on"
, pressing Tab will complete any prefix, not just snippets. Also, pressing Tab will insert the next suggestion and ⇧Tab will insert the previous suggestion.
# Navigate to last edit location (opens new window)
A new command Go to Last Edit Location (workbench.action.navigateToLastEditLocation
) was added to quickly navigate to the last location in a file that was edited. The default keybinding is ⌘K ⌘Q
.
# Save without formatters (opens new window)
The new command Save without Formatting (workbench.action.files.saveWithoutFormatting
) can be used to save a file without triggering any of the save participants (for example, formatters, remove trailing whitespace, final newline). The default keybinding is ⌘K S
. This is useful when editing files outside your normal projects, which may have different formatting conventions.
# IntelliSense locality bonus (opens new window)
Suggestions can now be sorted based on their distance to the cursor. Set "editor.suggest.localityBonus": true
and you'll see, for example, function parameters showing up at the top of the IntelliSense list.
# Emmet (opens new window)
We have made a few improvements to the Emmet features this iteration:
- If you have enabled Emmet in JavaScript files, then you can now have Emmet abbreviation expansion inside the
<script>
tags in an HTML file. - The Emmet: Wrap with Abbreviation feature is no longer restricted to files with the
.html
extension. - The Emmet: Balance (inward) feature now works on current node even if there is no selection.
- The bug (opens new window) of wrongfully considering CSS selectors with a
#
in SCSS files as valid abbreviations is now fixed.
# Disable progress reporting (opens new window)
With the git.showProgress
setting, you can now disable showing progress during Git operations.
# Push --force (opens new window)
There are times in your development day-to-day in which you just feel like taking a risk. Running git push --force
is a great example! VS Code now lets you forcefully push commits to a remote without the need to go into a terminal. Use the git.allowForcePush
, git.useForcePushWithLease
and git.confirmForcePush
settings to control this behavior. See issue 53286 (opens new window) for more details.
# Rename import path (opens new window)
Realize that an imported file could use a better name? Now can you rename the referenced file just by renaming the import:
# Convert to async function (opens new window)
The new Convert to async function suggestion for JavaScript and TypeScript rewrites functions that use .then
Promise chaining to use async
and await
:
Note that this feature requires that the setting
javascript.validate.enable
is set to true.
# Semicolon as a commit character for JS/TS (opens new window)
Semicolon is now a commit character for JavaScript and TypeScript suggestions. This means that you can accept that current suggestion just by typing ;
. Existing commit characters also include .
and (
.
You can disable commit characters by setting "editor.acceptSuggestionOnCommitCharacter": false
.
# HTML and CSS path completion excludes dot files (opens new window)
Files that start with .
are now excluded from path completion results.
# Better Markdown folding (opens new window)
Multiline lists, fenced code blocks, and raw HTML are now foldable in Markdown files:
# Markdown preview now opens links to local files in the preview (opens new window)
In the Markdown preview, clicking on a link to a local file will now open that file's preview:
This makes browsing documentation easier. Use the markdown.preview.openMarkdownLinks
setting to configure how links are handled. Valid settings values are:
inEditor
- Open local Markdown links in an editor.inPreview
- Open local Markdown links in the current preview. This is new default behavior.
# Better configuration when clauses (opens new window)
When authoring keybindings or menu visibility, when clauses (opens new window) are used. In a when clause, you can reference a configuration (setting) value by prefixing it with config.
, for example config.editor.tabCompletion
. Only boolean configuration properties had been supported but with this release, you can also use string and number values.
- 01
- 搭配 Jenkins 实现自动化打包微前端多个项目09-15
- 02
- 自动化打包微前端多个项目09-15
- 03
- el-upload 直传阿里 oss 并且显示自带进度条和视频回显封面图06-05