将VSCode设置成中文语言环境
快捷键【Ctrl+Shift+P】—输入【Configure Display Language】—将“en”改为“zh-CN”—打开extention输入【Chinese (Simplified)Language Pack for Visual Studio Code】—点击【Install】—安装完成以后点击【Restart】—重启后看到中文界面。
用VSCode运行HTML代码
快捷键【Ctrl+Shift+P】—输入【Tasks: Configure Task】—选择最后一个选项【Others】—弹出默认的一些配置选项—修改此默认配置文件task.json如下:
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "Run HTML file with Chrome", "type": "process", // [shell,process] "command": "Chrome", "args": ["${file}"], "windows": { "command": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" }, "group": "build", "presentation": { // Reveal the output only if unrecognized errors occur. "reveal": "never" //[always,never,silent] }, // Use the standard MS compiler pattern to detect errors, warnings and infos "problemMatcher": "$msCompile" } ] }
—在Html文件中按快捷键【Ctrl+Shift+B】执行。