Sublime Forum

Emmet (ex-Zen Coding) for Sublime Text 2

#1

Pretty weird that no one said anything about this one: github.com/sergeche/emmet-sublime

Did anyone tried? Any impressions?

0 Likes

#2

As i know it is still in beta
waiting for release
this tool should be even more powerful than zen coding

0 Likes

#3

The emmet plugin will eventually supplant the existing, end of line, ZenCoding plugin for SublimeText, which will never receive another update.

I recommend testing it out and filing feedback.

0 Likes

#4

I’ve been using it already a bit. Looks really solid. p10 ⊕ tab to generate padding:10px; is perfect!
There are some issues with snippets in HTML, which stop working with emmet if the default tab is used for completions github.com/sergeche/emmet-sublime/issues/9 - I had to change this behaviour.

0 Likes

#5

Can anyone explain how to make it work?
I am installing plugin via package control, but sublime has no reaction - emmet hot keys don`t work, there is no new commands in command panel and there is no entry in console at program start up.

0 Likes

#6

I just installed it - kicks ass. I prefer it over ZenCoding any day :smile:

0 Likes

#7

I used to be able to create a new document and hit shift-control-option-H to set the language to html and insert an html5 basic skeleton. With emmet installed this doesn’t work.

I have to save the empty document as an html file, then I can type html:5 TAB to get the same code. Any idea why?

0 Likes

#8

It also doesn’t show up for me in Package Control. I had to clone it from github.

0 Likes

#9

It does say on the readme part…

[quote]How to install
Clone git repo into your packages folder (in ST2, find Browse Packages… menu item to open this folder)
Restart ST2 editor
Or with package control:

Package Control: Add Repository github.com/sergeche/emmet-sublime
Package Control: Install Package emmet-sublime
Restart ST2 editor
You should remove or disable previous Zen Coding plugin, installed from Package Control, in order to operate properly.[/quote]

0 Likes

#10

I’ve been using it for a couple of days and I’m loving those new smart snippets (p10 -> padding: 10px;), but I’ve noticed some annoying issues with the new “expand unknown tags” behavior. If I try to expand “php” in a html scope, i’ll get instead of <?php ?>.

0 Likes

#11

@weslly: i had the same issue. You can either disable completion or add this into emmet.sublime-settings from user directory (if it’s not there, copy it from emmet install folder):

"snippets": { // custom snippets definitions, as per https://github.com/sergeche/zen-coding/blob/v0.7.1/snippets.json "html": { "abbreviations": { "php": "<?php" } } },

This will do.

If still doesn’t play nicely, you can try to disable tab abbreviation completely:

 	"disable_tab_abbreviations": true

(in preferences file) Or bind it to a different shortcut.

0 Likes

#12

I see now. I was unaware of the command Package Control > Add Repository.

0 Likes

#13

I patched ZenCoding lib for the old plugin to only work with a known set of tags for this reason. I found it too greedy otherwise.

Remember to keep serge in the loop:
github.com/sergeche/emmet-subli … state=open

I don’t know that he comes here that often.

0 Likes

#14

Just in case, site with emmet documentation: docs.emmet.io/

0 Likes

#15

I’ve just switched from ZenCoding to Emmet, but now I can’t do CTRL + arrow key up/down for moving the viewport up and down. Does anyone know how to regain that functionality, without disabling emmet?

0 Likes

#16

[quote]Increment/Decrement Number actions:

Increment by 1: Ctrl+↑
Decrement by 1: Ctrl+↓
Increment by 0.1: Alt+↑
Decrement by 0.1: Alt+↓
Increment by 10: ⌥⌘↑ / Shift+Alt+↑
Decrement by 10: ⌥⌘↓ / Shift+Alt+↓
[/quote]

Hrmm, yeah, it looks like it binds over it.

0 Likes

#17

Emmet has lots of actions so it’s nearly impossible to create a keymap which can be convenient and not override any of your keyboard shortcut you’re using every day.
For this case, I’ve added ability to disable default Emmet shortcuts in user preferences: github.com/sergeche/emmet-subli … -shortcuts

0 Likes

#18

I’m trying and trying but it zen is not working for me…
:cry:

0 Likes

#19

Yap! Nice plugin for CSS. It is quite similar as chrome’s inspect element

0 Likes

#20

Hi everyone.

I just started to learn HTML, and can’t figure out how to instal Zen coding in Sublime Text 2. I’ve tried this packagecontrol.io/installation#st2 but it didn’t work.

Thanks.

0 Likes