Sublime Forum

Html + TAB does nothing

#7
"auto_complete_selector": "text, meta.tag - punctuation.definition.tag.begin, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",

I just add text scope into auto_complete_selector and it works. Nothing related to Emmet sorry. To be less aggressive, you may add text.html rather than text.

Emmet uses ! and then tab.

4 Likes

#8

Thank you for your replay.
And where is this auto_complete_selector? How do I go there?

PS
If Emmet is in the right corner and I do ! and tab nothing happens also…

0 Likes

#9

For Emmet, I don’t know. I test it and it works on a clean/portable ST 2.0.2 Win x64 with just package control and emmet installed.

0 Likes

#10

OK :slightly_smiling:
But, how I do this autocomplete selector?

0 Likes

#11

Preferences -> Settings - User

0 Likes

#12

HTML Boilerplate will give you what you want.

0 Likes

HTML Auto-complete problem
#13

OK - this works - thank you :slightly_smiling:

But, what I want is to get following when I type html+tab:

"
!DOCTYPE html>
html>
head>
title>

/head>
body>

/body>
/html>
"

0 Likes

#14

thank you, this is more or less what I wanted :slightly_smiling:

But it is a little too much.

Thank you anyway - now I know what I should look for.

0 Likes

#15

How about Sublime Templates?

1 Like

#16

This is cool with this New File > and choosing type :slightly_smiling:

I will stay with this for the moment, but will still look for this html + tab.

Thank you very much!

0 Likes

#17

How about HTML5? You have to type “HTML5” (without the quotes) plus TAB to get a basic template. Plus, you get other snippets but you will have to experiment, as there is little documentation for this package.

2 Likes

#18

The Emmet plugin is the best one out there. But it needs PyV8 binaries to be downloaded. Did you get a prompt about some error in loading PyV8 binaries while installing Emmet?

0 Likes

#19

No, I don’t have any errors in relation to Emmet, but !+tab does not work either, when Emmet is displayed in the right corner…
I saved empty file as test.html and is not working…

For the moment I am using SublimeTmpl…

0 Likes

#20

You do know that for Emmet to work, you have to manually set the file type to HTML.
When I do that, with Emmet installed, and type HTML + Tab, I get <HTML></HTML>.
I need more than that. I set up my own custom HTML template and open it when I need it.

I don’t use Emmet because it used to conflict with other plug-ins I had.
You could disable all your other packages except Emmet and see if it works. (restart Sublime)
If it works, enable your other packages one at a time until Emmet doesn’t work. (restart Sublime each time)
Then you can decide whether to keep Emmet or the conflicting package.
If that doesn’t work, perhaps you need to re-install Sublime Text.

0 Likes

#21

At least on Sublime Text 3 this works without any plugins. I suggest you stop using ST2 since it is no longer maintained.

With ST3 you can type “html” and press Tab to get base HTML 5 compliant document with base tags.

0 Likes

#22

I have ST3, and you’re correct, it does give a base document but it’s confusing to use.
I prefer HTML Boilerplate or my own custom templates. What’s wrong with using packages?

0 Likes

#23

Nothing wrong with packages. But someone said here that you NEED a package to use html snippet. With ST3 that is not true.

0 Likes

#24

Make sure file type is set to HTML on the bottom-right box below the window.

2 Likes

#25

Just leaving a comment because i was having trouble with this same thing but then figured it out a minute later… Make sure you have your file saved as a .html for html + tab to work.

I start off my html files like this:

cmnd + N to open a new file
cmnd + S to save/name “blahblah.html”
(shift + cmnd + s to rename)
html then tab and youre ready to roll

Hope this helps someone!

2 Likes

#26

I’m a newbie and had the same trouble, in terminal subl index.html or just save a .html file in Sublime 3, then type ! TAB (no spaces)

I suppose ! is short for !doctype and so autocompletes the rest…Like I said I’m a newbie so still breaking stuff

0 Likes