Mospective
Mospective

Reputation: 91

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?

Upvotes: 8

Views: 19555

Answers (7)

The above answer was the unique correct, that worked:
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.

Upvotes: -1

nita
nita

Reputation: 1

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 :)

Upvotes: 0

Justin
Justin

Reputation: 1059

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.

Upvotes: 1

Jubair Sayeed Linas
Jubair Sayeed Linas

Reputation: 176

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

Upvotes: 15

LukeCage
LukeCage

Reputation: 19

@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

Upvotes: 0

Rafiozoo
Rafiozoo

Reputation: 116

Text editor doesn't know what shortcut to expand until you save new file as *.html or change the syntax (bottom/right), because new document starts in plain text.

Upvotes: 6

estebanlopeza
estebanlopeza

Reputation: 19

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).

Upvotes: 1

Related Questions