vscode编写html,常用快捷方式与插件

 

一、tab键补全

1.1打开vscode新建html文件,在第一行输入!,然后按下tab键,会直接出现编写html语言的基本框架标签

效果如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

1.2实现html代码的对齐

Shift  +  Alt  + F     实现代码的对齐

1.3注释与取消注释

注释:ctrl+k+c

取消注释:ctrl+k+u

二、常用插件

  • Auto Rename Tag
    : Automatically rename paired HTML/XML tag, same as Visual Studio IDE does.

  • Beautify
    : Beautify javascript, JSON, CSS, Sass, and HTML in Visual Studio Code.

  • Chinese (Simplified) Language Pack 
    : Language pack extension for Chinese (Simplified)

  • ESLint
    :Integrates ESLint JavaScript into VS Code.

  • HTML CSS Supportecmel
    :CSS support for HTML documents

  • HTML Snippets
    :HTML tags including HTML5 Snippets

  • HTMLHint
    : A Static Code Analysis Tool for HTML

  • Open HTML in Default Brow
    :Open HTML in Default Browser

  • Path Autocomplete
    :Provides path completion for visual studio code.

posted @ 2019-01-31 12:19  HR·  阅读(12640)  评论(0编辑  收藏  举报