version 1.8
# November 2016 (version 1.8) (opens new window)
# November Release Summary (opens new window)
Welcome to the November release of Visual Studio Code. There are a number of significant updates in this version that we hope you will like, some of the key highlights include:
- Hot Exit (opens new window) - Switch context quickly and never lose your changes.
- Focus on Your Code (opens new window) - Enhancements like Zen Mode, configurable Activity Bar, and more.
- Settings improvements (opens new window) - New experience for configuring VS Code.
- New Selection menu (opens new window) - Easily discover and use the editor selection commands.
- Faster Text Search (opens new window) - Find the code you're looking for fast no matter how large your project.
- Snippet authoring (opens new window) - Use variables in your code snippets.
- Keyboard shortcuts (opens new window) - Create custom shortcuts with command arguments, find popular Keymaps.
- JavaScript IntelliSense in HTML (opens new window) - Get full JavaScript language support in HTML files.
- UI for Multitarget Debugging (opens new window) - Launch simultaneous debug sessions.
- TypeScript 2.1 (opens new window) - Improved language support with the latest TypeScript update.
- JavaScript (opens new window) - Support for Object Rest/Spread.
The release notes are arranged in the following sections related to VS Code focus areas. Here are some further updates:
- Workbench (opens new window) - New View picker, Integrated Terminal improvements, macOS themed title.
- Settings (opens new window) - Search and easily edit settings, find Keymap extensions.
- Editor (opens new window) - Git Clone, new editor settings, Sublime Text compatibility.
- Languages (opens new window) - CSS apply rule, Markdown preview customization, TSLint and ESLint extension updates.
- Debugging (opens new window) - Add launch configurations easily as snippets through IntelliSense.
- Node.js Debugging (opens new window) - Just My Code, load environment variables from files, help for sourcemaps.
- Extension Authoring (opens new window) - Strict Null checks, snippet completions, debugger extension updates.
# View Picker (opens new window)
A new picker is added that shows Views, Panels, Output channels and Terminals and allows for easy opening of those. You can open it via the Open View command or by typing view
followed by a space
into Quick Open.
On Windows and Mac, you can press Ctrl+Q to bring up the picker. On Linux, you can reassign the key binding if you want (Ctrl+Q is assigned to quitting on Linux). Pressing Ctrl+Q and holding the Ctrl key while pressing the Q allows you to jump to an entry from the list and open it after you release the keys.
# Settings (opens new window)
VS Code's customization model is very simple in the form of a settings.json
file which you edit to configure VS Code's behavior. To discover available settings, we show Default Settings in a separate editor as well as provide IntelliSense in your opened global or workspace settings. From user feedback and usability studies, we learned that people were still having trouble working with their settings. In this release, we did some explorations to improve discoverability and the user experience for modifying settings and this resulted in the following improvements.
# Search settings (opens new window)
One of the big reasons for showing the default settings is to let users search and discover settings. To facilitate this, the Default Settings editor now comes with a big Search bar where you can easily search for settings. In addition to showing and highlighting settings matching your search criteria, this will also filter out those settings which are not matching. This makes finding settings quick and easy.
# Settings groups (opens new window)
We enhanced visual representation of Default Settings groups to make settings navigation more user friendly. We also introduced a new group of most commonly used settings.
# Quick Edit (opens new window)
We introduced actions inside the Default Settings and settings.json
editors which will help you quickly copy or update a setting.
# One Side by Side Settings editor (opens new window)
Last but not least, we grouped the Default Settings and settings.json
editors into one side by side editor. This addresses the issue of managing two editors for settings.
Explorations and improvements continue... Stay tuned to our next release plan.
# Keyboard shortcuts (opens new window)
# Key binding command arguments (opens new window)
We added support to invoke commands with arguments to the keybindings.json
configuration file. This is useful if you often perform the same operation on a specific file or folder. Simply add a custom keyboard shortcut to do exactly what you want.
The following is an example overriding the Enter key to print some text:
{
"key": "enter",
"command": "type",
"args": { "text": "Hello World" },
"when": "editorTextFocus"
}
2
3
4
5
6
The type command will receive { "text": "Hello World"}
as first argument and add "Hello World" to the file instead of producing the default command.
# Snippets (opens new window)
# Snippet Variables (opens new window)
In your custom snippets, you can now use variables. The syntax for variables is $name
for simple variables and ${name:default}
for variables with a default value. Variables evaluate to their value, the empty string, or, if present, their default value. When a variable is unknown, we insert it as a placeholder.
The following variables can be used:
TM_SELECTED_TEXT
- The currently selected text or the empty string.TM_CURRENT_LINE
- The contents of the current line.TM_CURRENT_WORD
- The contents of the word under cursor or the empty string.TM_LINE_INDEX
- The zero-index based line number.TM_LINE_NUMBER
- The one-index based line number.TM_FILENAME
- The filename of the current document.TM_DIRECTORY
- The directory of the current document.TM_FILEPATH
- The full file path of the current document.
The following is an example of a snippet that surrounds the selected text with single quotes or, when no text is selected, inserts a type_here
-placeholder.
"in quotes": {
"prefix": "inq",
"body": "'${TM_SELECTED_TEXT:${1:type_here}}'"
}
2
3
4
# Snippets in JSON schemas (opens new window)
The JSON language service uses JSON schemas to validate JSON documents as well as to provide completions. As a VS code specific extension to JSON schemas, you can now also specify snippets proposals in the schema for a richer experience. The snippet proposals are shown as additional completion proposals and use the snippet syntax to specify placeholders. See the JSON documentation (opens new window) for more information.