简体   繁体   中英

Sublime Text 3 - Emmet shortcut for HTML 5 not working.

I have recently downloaded sublime text 3 and installed emmet. The issue that I am having is that when I write the short code for HTML 5 and press tab, it doesn't work. This method was used in sublime text 2 and it worked. Does anyone have any solutions to this issue?

type ! and then press Tab . found the answer on cheatsheet

在您将新文件另存为 *.html 或更改语法(底部/右侧)之前,文本编辑器不知道要展开什么快捷方式,因为新文档以纯文本开头。

I guess that you are looking for something like Html Boilerplate . This package generates a full html5 structure just by typing

htmlboiler

and pressing TAB

EDIT: Just found the answer in the Emmet official cheatsheet ; just type

!

And hit TAB (Yes, just the exclamation character).

You don't need an extension. Just either open an html file, save it as an html file, or hit ctrl + shift + P then type "html" and hit enter to select "Set Syntax: HTML"

Then, simply type "HTML" followed by either tab or ctrl+space.

@ayek is correct, all you need to do is set the document type to HTML; once you do, you can then type "html" and hit tab. Good luck, and happy coding. -KW

Create a new file (no need to save or type anything yet). From the menu, View > Syntax , then select HTML . Now type 'html' and press TAB .

The following appears:

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>

</body>
</html>

This didn't need any extra plugins - standard out-of-the-box Sublime 3 functionality :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM