Skip to content

hunterxu-gh/vscode-tips-and-tricks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

VS Code Tips and Tricks 官方指南 - 中文翻译版

注:本文由X-hung个人翻译,仅供那些想要使用VSCode但英文却不好或者不想读英文参考的朋友。任何人可自由编辑此文档。版权归Visual Studio Code官方所有。 This Chinese translation version is translated by X-hung, Everybody can edit it if you have better suggestions. Thanks.

目录 Table of Contents

  1. 基础 Basics
  2. 个性化 Customization
  3. 扩展 Extensions
  4. 文件(夹)管理 File and folder management
  5. 编辑技巧 Editing hacks
  6. 智能填充 IntelliSense
  7. 代码片段 Snippets
  8. Git集成 Git integration
  9. 调试 Debugging
  10. 运行 Task runner
  11. 其他资源 Other Resources

下文所使用的快捷键可能无法与最新版本精准匹配,点击这里查看最新的快捷键参考. The key bindings below may or may not be accurate with the latest build. See here for the latest keyboard shortcut reference.

基础 Basics

VS Code 测试版 Insider Version of VS Code

VS Code团队使用内测版本来测试最新版的功能以及修复Bug。您可以在这里下载相同的测试版 The Visual Studio Code team uses the Insiders version to test the latest features and bug fixes of VS Code. You can use this same version by downloading here.

  • 对于早期使用者 - 测试版提供最新更改的代码,这将会导致一些偶然的Build失败。
  • 高频率Build - 每天都有新的Build,提供最新的Bug修复和新功能。
  • 并排安装 - 测试版发布后,稳定版也会随后发布,使您不至于独立的使用两个版本。
  • For Early Adopters - Insiders has the most recent code changes and may lead to the occasional broken build.
  • Frequent Builds - New builds everyday with the latest bug fixes and features.
  • Side-by-side install - Insiders installs next to the Stable build allowing you to use either independently.

side by side install

新手上路 Getting Started

打开欢迎使用页面开始学习VS Code的基本用法。帮助 > 欢迎使用. Open the Welcome page to get started with the basics of VS Code. Help > Welcome.

welcome page

包括交互式演练场 Includes the Interactive Playground.

interactive playground

命令面板 Command Palette

根据您当前打开的内容来获取所有可用命令 Access all available commands based on your current context.

Mac: cmd+shift+p or f1

Windows / Linux: ctrl+shift+p or f1

command palette

快捷键参考 Reference keybindings

所有命令面板的命令都能使用与之绑定的快捷键操作(如果存在的话)。如果您忘了要使用哪个快捷键,可以打开命令面板找一找。 All of the commands are in the Command Palette with the associated key binding (if it exists). If you forget what the key binding is use the Command Palette to help you out.

keyboard references

快速打开 Quick open

快速打开文件。 Quickly open files.

Mac: cmd+p

Windows / Linux: ctrl+p

Quick Open

提示: 输入“?”来查看帮助建议。 Tip: Type "?" to view help suggestions.

在最近打开的文件中寻找 Navigate between recently opened files

重复使用快速打开快捷键在最近打开的文件之间快速循环浏览。 Repeat the Quick Open keyboard shortcut to cycle quickly between recently opened files.

通过“快速打开”打开多个文件 Open multiple files from Quick Open

您可以使用快速打开中的右方向键来快速打开多个文件。这将在后台打开当前选定的文件,此时您可以使用快速打开继续选择文件。 You can open multiple files from Quick Open by pressing the Right arrow key. This will open the currently selected file in the background and you can continue selecting files from Quick Open.

CLI工具 CLI tool

Linux系统: 参见这里的说明。 Linux: Follow instructions here.

Windows系统: 参见这里的说明。 Windows: Follow instructions here.

Mac系统: 往下看. Mac: see below.

打开命令面板 (F1) 输入“shell command” 敲击回车键执行 Shell Command: Install 'code' command in PATH. Open the Command Palette (F1) and type "shell command". Hit enter to execute Shell Command: Install 'code' command in PATH.

shell command

# 在当前目录打开代码 open code with current directory
code .

# 在最近使用的代码窗口打开当前目录 open the current directory in the most recently used code window
code -r .

# 新建窗口 create a new window
code -n

# 更改语言 change the language
code --locale=es

# 打开diff编辑器 open diff editor
code --diff <file1> <file2>

# 查看帮助选项 see help options
code --help

# 禁用所有扩展部件 disable all extensions
code --disable-extensions .

all cli commands

.vscode文件夹 .vscode folder

工作区的特殊文件都是以.vscode为后缀。比如说,tasks.json 用来设置运行程序,launch.json 用来设置调试程序。 Workspace specific files are in .vscode. For example, tasks.json for the Task Runner and launch.json for the debugger.

状态栏修饰 Status Bar decorations

错误和警告 Errors and Warnings

Mac: shift+cmd+m

Windows / Linux: ctrl+shift+m

快速跳转至项目中的错误和警告行。 Quickly jump to errors and warnings in the project.

使用f8 或者 shift+f8在错误行中来回浏览。 Cycle through errors with f8 or shift+f8

errors and warnings

您可以输入 ('errors', 'warnings') 或者文本匹配来过滤问题信息。 You can filter problems by type ('errors', 'warnings') or text matching.

更改语言模式 Change language mode

Mac: cmd+k m

Windows / Linux: ctrl+k m

change syntax

如果要保留该文件类型的新语言模式,可以使用关联配置文件... 命令将当前文件扩展名与已安装语言相关联。 If you want to persist the new language mode for that file type, you can use the Configure File Association for ... command to associate the current file extension with an installed language.

个性化 Customization

这里有许多方法让您个性化定制VS Code。 There are many things you can do to customize VS Code.

  • 更改主题 Change your theme
  • 更改键盘快捷键 Change your keyboard shortcuts
  • 调整设置 Tune your settings
  • 添加JSON验证文件 Add JSON validation
  • 创建代码片段 Create snippets
  • 安装扩展部件 Install extensions

Check out the full documentation.

更改主题 Change your theme

打开命令面板输入“主题”,您可以从扩展商店获取更多主题。 Open the Command Palette and type "themes". You can install more themes from the extension Marketplace.

Preview themes

此外,您还可以安装或改变文件图标。 Additionally, you can install and change your File Icon themes.

File icon themes

更改快捷键 Change your keyboard shortcuts

快捷键参考表 Keyboard Reference Sheets

下载适用您的系统的键盘快捷键参考图:(macOS, Windows, Linux)。 Download the keyboard shortcut reference sheet for your platform (macOS, Windows, Linux).

Keyboard Reference Sheet

键盘布局 Keymaps

您是否习惯了其他编辑器的快捷键方式?在这里您可以安装一个键盘布局扩展来把您喜爱的编辑器的快捷键方式迁移至VS Code。打开首选项 > 键盘扩展 查看扩展商店里提供的快捷键扩展。 Are you used to keyboard shortcuts from another editor? You can install a Keymap extension that brings the keyboard shortcuts from your favorite editor to VS Code. Go to Preferences > Keymap Extensions to see the current list on the Marketplace.

看一看比较受欢迎的几个: Some of the more popular ones:

自定义您的快捷键 Customize your keyboard shortcuts

打开命令面板 输入“快捷键”。您可以在打开的文件的右侧添加新的快捷键方式。 Open the Command Palette and type "keyboard shortcuts." You can now add your own keybindings in the file on the right.

customize keyboard shortcuts

更多请参见:Key Bindings for Visual Studio Code. See more in Key Bindings for Visual Studio Code.

调整设置 Tune your settings

打开settings.json

Open settings.json

Mac: cmd+,

Windows / Linux: File > Preferences > Settings

粘贴格式 Format on paste

"editor.formatOnPaste": true

更改字体大小 Change the font size

"editor.fontSize": 18

更改缩放级别 Change the zoom level

"window.zoomLevel": 5

英文连字功能 Font ligatures

"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true

提示: 您可能需要安装支持连字功能的字体。 FiraCode 字体在VS Code团队中是比较受欢迎的。 Tip: You will need to have a font installed that supports font ligatures. FiraCode is a popular font on the VS Code team.

font ligatures

自动存档 Auto Save

"files.autoSave": "afterDelay"

您还可以使用顶级菜单中的文件> 自动保存打开自动保存 You can also toggle Auto Save from the top-level menu with the File > Auto Save.

保存格式 Format on save

"editor.formatOnSave": true,

改变缩进字符数 Change the size of tab characters

"editor.tabSize": 4

缩进改空格 Spaces or tabs

"editor.insertSpaces": true

空白渲染 Render whitespace

"editor.renderWhitespace": "all"

忽略文件(夹)Ignore files / folders

从编辑窗口里删除这些文件(夹) Removes these files / folders from your editor window.

"files.exclude": {
        "somefolder/": true,
        "somefile": true
}

从搜索结果中删除这些文件(夹) Remove these files / folders from search results.

"search.exclude": {
    "someFolder/": true,
    "somefile": true
}

查看更多。 And many, many others.

特定语言设置 Language specific settings

只给一些特定的语言添加设置 For those settings you only want for specific languages.

"[languageid]": {

}

提示: 您可以在命令面板中输入“更改语言特定设置”来获取语言的ID。 Tip: You can find the language ID by typing in the Command Palette "Configure language specific settings"

language based settings

添加JASON验证 Add JSON Validation

为大多数文件启用默认设置。您可以在settings.json中添加自己的模式和验证 Enabled by default for many files. Create your own schema and validation in settings.json

"json.schemas": [
    {
        "fileMatch": [
            "/bower.json"
        ],
        "url": "http://json.schemastore.org/bower"
    }
]

或者在您的工作区中定义的模式 or for a schema defined in your workspace

"json.schemas": [
    {
        "fileMatch": [
            "/foo.json"
        ],
        "url": "./myschema.json"
    }
]

或者自定义模式 or a custom schema

"json.schemas": [
    {
        "fileMatch": [
            "/.myconfig"
        ],
        "schema": {
            "type": "object",
            "properties": {
                "name" : {
                    "type": "string",
                    "description": "The name of the entry"
                }
            }
        }
    },

文档中查看更多。 See more in the documentation.

扩展部件 Extensions

获取扩展部件 Find extensions

  1. 在VS Code的扩展商店里查看 In the VS Code Marketplace.
  2. 在VS Code中直接搜索 Search inside VS Code
  3. 查看扩展推荐 View extension recommendations
  4. 社区策划的扩展列表,如awesome-vscode Community curated extension lists, such as awesome-vscode.

安装扩展部件 Install extensions

打开扩展栏,您可以通过搜索框搜索或者点击更多(...)按钮来根据安装量过滤或排序扩展部件。 Click the Extensions Activity Bar button. You can search via the search bar or click the More (...) button to filter and sort by install count.

install extensions

扩展推荐 Extension recommendations

打开扩展栏,接着在更多(...)里点击推荐。 Click the Extensions Activity Bar button. Then click Show Recommended Extensions in the More (...) button menu.

show recommended extensions

创建自己的扩展部件 Creating my own extension

您对自建扩展感兴趣吗?您可以在这份文档中学习如何自己创建扩展部件。具体参见documentation on contribution points。 Are you interested in creating your own extension? You can learn how to do this in the documentation, specifically check out the documentation on contribution points.

  • 设置 configuration
  • 命令 commands
  • 快捷键 keybindings
  • 语言 languages
  • 调试 debuggers
  • 语法 grammars
  • 主题 themes
  • 代码片段 Snippets snippets
  • JSON验证 jsonValidation

过滤和文件夹管理 File and folder management

集成终端 Integrated terminal

Windows / Linux / Mac: ctrl+`

Integrated terminal

查看更多: Further reading:

自动存档 Auto Save

使用 cmd+, 打开 settings.json

Open settings.json with cmd+,

"files.autoSave": "afterDelay"

您还可以使用顶级菜单中的文件> 自动保存打开自动保存 You can also toggle Auto Save from the top-level menu with the File > Auto Save.

打开侧边栏 Toggle Sidebar

Mac: cmd+b

Windows / Linux: ctrl+b

toggle side bar

禅模式 Zen Mode

Mac: cmd+k z

Windows / Linux: ctrl+k z

zen mode

进入不会让您分心的禅模式。 Enter distraction free Zen mode.

并排编辑 Side by side editing

Mac: cmd+\ or cmd then click a file from the File Explorer.

Windows / Linux: ctrl+\

Linux: ctrl+2

split editors

您可以拖放编辑器来创建新的编辑器组并且在组与组之间移动编辑器。 You can use drag and drop editors to create new editor groups and move editors between groups.

在编辑器之间切换 Switch between editors

Mac: cmd+1, cmd+2, cmd+3

Windows / Linux: ctrl+1, ctrl+2, ctrl+3

navigate editors

移动至探索窗口 Move to Explorer window

Mac: cmd+shift+e

Windows / Linux: ctrl+shift+e

新建&打开文件 Create and open a file

Mac: cmd+click

Windows / Linux: ctrl+click

create and open file

关闭当前文件夹 Close the currently opened folder

Mac: cmd+w

Windows / Linux: ctrl+k f

历史纪录 History

使用ctrl+tab浏览全部历史纪录 Navigate entire history with ctrl+tab

向下浏览 Navigate back.

Mac: ctrl+-

Windows / Linux: alt+left

向上浏览 Navigate Forward.

Mac: ctrl+shift+-

Windows / Linux: alt+right

navigate history

转至某文件 Navigate to a file

Mac: cmd+e or cmd+p

Windows / Linux: ctrl+e or ctrl+p

navigate to file

文件关联 File associations

为没有准确检测到的文件创建语言关联(例如,许多配置文件是JSON格式)。 Create language associations for files that aren't detected accurately (for example, many config files are JSON).

"file.associations": {
    ".database": "json"
}

编辑技巧 Editing hacks

以下是常见编辑代码的功能选择。如果您觉得这些组合快捷键用得不舒服,可以考虑安装一个Keymap extension。 Here are a selection of common features for editing code. If the keyboard shortcuts aren't comfortable for you, consider installing a Keymap extension for your old editor.

多光标选择 Multi cursor selection

Mac: opt+cmd+up or opt+cmd+down

Windows: ctrl+alt+up or ctrl+alt+down

Linux: alt+shift+up or alt+shift+down

multi cursor

multi cursor second example

在当前的选择上添加更多光标 Add more cursors to current selection.

add cursor to all occurrences of current selection

多行转单行 Join line

Mac: ctrl+j

Windows / Linux: 默认没有绑定快捷键。 打开键盘快捷方式设置,在editor.action.joinLines 中绑定一个您自己的快捷键设置。 Windows / Linux: Not bound by default. Open Keyboard Shortcuts and bind editor.action.joinLines to a shortcut of your choice.

Join lines

复制上/下一行的内容 Copy line up / down

Mac: opt+shift+up or opt+shift+down

Windows / Linux(Issue #5363): shift+alt+down or shift+alt+up

copy line down

扩大/减少选择区 Shrink / expand selection

更多参见documentation More in documentation

Mac: ctrl+shift+cmd+left or ctrl+shift+cmd+right

Windows / Linux: shift+alt+left or shift+alt+right

shrink expand selection

转到文件中的符号 Go to Symbol in File

Mac: cmd+shift+o

Windows / Linux: ctrl+shift+o

Find by symbol

您可以通过添加冒号@:来分类符号。 You can group the symbols by kind by adding a colon, @:.

group symbols by kind

转到工作区中的符号 Go to Symbol in Workspace

Mac: cmd+t

Windows / Linux: ctrl+t

go to symbol in workspace

转至特定行 Navigate to a specific line

Mac: ctrl+g or cmd+p, :

Windows / Linux: ctrl+g

navigate to line

撤销光标位 Undo cursor position

Mac: cmd+u

Windows / Linux: ctrl+u

undo cursor position

向上/下移动该行 Move line up and down

Mac: opt+up or opt+down

Windows / Linux: alt+up or alt+down

move line up and down

删除行尾空格 Trim trailing whitespace

Mac: cmd+k cmd+x

Windows / Linux: ctrl+k ctrl+x

trailing whitespace

代码格式 Code formatting

当前选择的源代码格式 Currently selected source code

Mac: cmd+k, cmd+f

Windows / Linux: ctrl+k, ctrl+f

所有文档格式 Whole document format

Windows / Linux: shift+alt+f

code formatting

代码折叠 Code folding

Mac: shift+cmd+[ and shift+cmd+]

Windows / Linux: ctrl+shift+[ and ctrl+shift+]

code folding

选择当前行 Select current line

Mac: cmd+i

Windows / Linux: ctrl+i

select current line

转至文件顶部/尾部 Navigate to beginning and end of file

Mac: cmd+up and cmd+down

Windows: ctrl+up and ctrl+down

Linux: ctrl+home and ctrl+end

navigate to beginning and end of file

打开Markdown预览界面 Open Markdown Preview

在Markdown文件中,使用 In a Markdown file, use

Mac: shift+cmd+v

Windows / Linux: ctrl+shift+v

toggle readme preview

并排显示Markdown编辑和预览 Side by Side Markdown Edit and Preview

在Markdown文件中,使用 In a Markdown file, use

Mac: cmd+k v

Windows / Linux: ctrl+k v

彩蛋:预览此时会同步进行 Special bonus: The preview will now sync.

markdown sync

智能填充 IntelliSense

在任何时候,使用ctrl+space来触发建议插件 Anytime, try ctrl+space to trigger the Suggestions widget.

intellisense

您可以查看可用的方法,参数提示,短文档等。 You can view available methods, parameter hints, short documentation, etc.

Peek

选择一个符号,接着按下alt+f12。或者,您可以使用上下文菜单。 Select a symbol then type alt+f12. Alternatively, you can use the context menu.

peek

转至定义 Go to Definition

选择一个符号,接着按下f12。或者,您可以使用上下文菜单。 Select a symbol then type f12. Alternatively, you can use the context menu or ctrl+click (cmd+click on macOS).

go to definition

您可以使用转到 > 后退 命令或者 alt+left (Mac OS中使用 ctrl+- )返回到之前的位置。 You can go back to your previous location with the Go > Back command or alt+left (ctrl+- on macOS).

查找所有的参考 Find All References

选择一个符号,接着按下shift+f12。或者,您可以使用上下文菜单。 Select a symbol then type shift+f12. Alternatively, you can use the context menu.

find all references

重命名符号 Rename Symbol

选择一个符号,接着按下f2。或者,您可以使用上下文菜单。 Select a symbol then type f2. Alternatively, you can use the context menu.

rename symbol

.eslintrc.json

安装ESLint 扩展,按照您喜欢的方式设置。详见这里。 Install the ESLint extension. Configure your linter however you'd like. Specification is here.

下面是使用ES6的配置 Here is configuration to use ES6.

{
    "env": {
        "browser": true,
        "commonjs": true,
        "es6": true,
        "node": true
    },
    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true,
            "classes": true,
            "defaultParams": true
        }
    },
    "rules": {
        "no-const-assign": 1,
        "no-extra-semi": 0,
        "semi": 0,
        "no-fallthrough": 0,
        "no-empty": 0,
        "no-mixed-spaces-and-tabs": 0,
        "no-redeclare": 0,
        "no-this-before-super": 1,
        "no-undef": 1,
        "no-unreachable": 1,
        "no-use-before-define": 0,
        "constructor-super": 1,
        "curly": 0,
        "eqeqeq": 0,
        "func-names": 0,
        "valid-typeof": 1
    }
}

package.json

package.json文件中查看智能填充设置 See IntelliSense for your package.json file.

package json intellisense

缩写语法 Emmet syntax

Support for Emmet syntax.

emmet syntax

代码片段 Snippets

创建自定义代码片段 Create custom snippets

文件 > 首选项 > 用户代码片段,选择一种语言并创建新的代码片段

File > Preferences > User Snippets, select the language, and create a snippet.

"create component": {
    "prefix": "component",
    "body": [
        "class $1 extends React.Component {",
        "",
        "	render() {",
        "		return ($2);",
        " 	}",
        "",
        "}"
    ]
},

详情参见Creating your own Snippets。 See more details in Creating your own Snippets.

Git集成 Git Integration

Git集成带有VS Code中的“in-the-box”。您可以从扩展商店中安装其他SCM提供程序。本节仅介绍Git集成。其他的SCM提供了更多的UI和手势。 Git integration comes with VS Code "in-the-box". You can install other SCM provider from the extension Marketplace. This section describes the Git integration but much of the UI and gestures are shared by other SCM providers.

Diffs

点击侧边栏的源代码管理按钮,接着选择文件来diff。 Click the Source Control button in the Activity Bar then select the file to diff.

git icon

并排窗口 Side by side

默认的是并排Diff。 Default is side by side diff.

git diff side by side

在行内查看 Inline view

在窗口顶部右侧点击更多(...) > 切换为行内查看切换至行内查看模式 Toggle inline view by clicking the More (...) button in the top right and selecting Switch to Inline View.

more git button

git inline

如果您偏好行内查看,可以设置"diffEditor.renderSideBySide": false。 If you prefer the inline view, you can set "diffEditor.renderSideBySide": false.

审查窗格 Review Pane

F7Shift+F7在diff中导航。这将以统一的补丁格式呈现。使用方向键在行与行之间转换,按下 Enter 键会跳转回diff编辑器并定位到选择的行。 Navigate through diffs with F7 and Shift+F7. This will present them in a unified patch format. Lines can be navigated with arrow keys and pressing Enter will jump back in the diff editor and the selected line.

diff_review_pane

编辑待更改的文件 Edit pending changes

您可以在diff模式下直接编辑待更改的文件。 You can make edits directly in the pending changes of the diff view.

分支 Branches

通过底部状态栏的按钮轻松地切换Git分支。 Easily switch between Git branches via the Status Bar.

switch branches

选择 Staging

选择全部 Stage all

将鼠标悬停在文件编号上,然后单击加号按钮。 Hover over the number of files and click the plus button.

git stage all

选择部分 Stage selected

选择该文件(使用方向键),然后从命令面板中选择**Stage Selected Range(部分选择范围)**来选择文件的一部分。 Stage a portion of a file by selecting that file (using the arrows) and then choosing Stage Selected Ranges from the Command Palette.

git stage selected

撤销前一次提交 Undo last commit

undo last commit

查看Git输出 See Git output

在VS Code中可以轻松地查看Git实际正在运行的每一条指令。这对正在学习Git或者Debug一个不同源的问题很有用。 VS Code makes it easy to see what Git commands are actually running. This is helpful when learning Git or debugging a difficult source control issue.

Mac: shift+cmd+u

Windows / Linux: ctrl+shift+u

运行toggleOutput. 在下拉菜单中选择Git to run toggleOutput. Select Git in the drop-down.

Gutter指示器 Gutter indicators

查看编辑器中的diff修饰。详情参见该文档 View diff decorations in editor. See documentation for more details.

git gutter indicators

解决合并冲突 Resolve merge conflicts

在合并时,点击侧边栏的源代码管理按钮,在Diff模式下更改。 During a merge, click the Source Control button in the Activity Bar and make changes in the diff view.

git icon

设置VS Code为默认合并工具 Setup VS Code as default merge tool

git config --global merge.tool code

调试 Debugging

设置调试器 Configure debugger

f1 and select Debug: Open launch.json, select the environment. This will generate a launch.json file. Works out of the box as expected for Node.js and other environments. May need some additional configuration for other languages. See documentation for more details.

configure debugging

断点和按步运行 Breakpoints and stepping through

在行号旁边放置断点, 使用“调试”窗口小部件向下导航。 Place breakpoints next to the line number. Navigate forward with the Debug widget.

debug

数据检查 Data inspection

控制台中的调试控制台面板查看数据检查。 Inspect variables in the Debug panels and in the console.

data inspection

行内查看 Inline values

您可以设置"debug.inlineValues": true来在调试器的行内查看变量值。这是一个试验功能,默认是关闭的。 You can set "debug.inlineValues": true to see variable values inline in the debugger. This feature is experimental and disabled by default.

任务运行 Task Runner

自动检测任务 Auto detect tasks

选择顶部菜单栏中的任务 > 配置任务...,接着选择您想要运行的任务类型。此操作会生成一个名为task.json 的配置文件,就像下面显示的内容一样。更多内容参见此文档

Select Tasks from the top-level menu, run the command Configure Tasks..., then select the type of task you'd like to run. This will generate a task.json file with content like the following. See the Tasks documentation for more details.

{
    // See http://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "command": "npm",
    "isShellCommand": true,
    "showOutput": "always",
    "suppressTaskName": true,
    "tasks": [
        {
            "taskName": "install",
            "args": ["install"]
        },
        {
            "taskName": "build",
            "args": ["run", "build"]
        }
    ]
}

此处偶尔会出现有关自动生成的问题。查看文档来获取合适的方法。 There are occasionally issues with auto generation. Check out the documentation for getting things to work properly.

从任务菜单运行任务 Run tasks from the Tasks menu

从顶部菜单栏选择任务 > 运行任务...,接着选择您想要运行的任务。此外还可以使用终止任务... 选项来终止任务的运行。 Select Tasks from the top-level menu, run the command Run Task..., and select the task you want to run. Terminate the running task by running the command Terminate Task...

task runner

其他资源 Other Resources

About

Collection of helpful tips and tricks for VS Code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published