Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 using Zen coding aka Emmet inside a script area

When using Sublime Text 2 with Emmet (formerly Zen Coding) inside a script area (for Moustache.js) we lose the quick-codes and kb shortcuts.

The auto complete is replaced the HTML markup in to Javascript snippets, which is understandable since we are inside a <script id="DataTemplate" type="text/html"> when trying to do HTML markup.

Is there to get back Zen coding aka Emmet quick codes while inside a <script> tag?

like image 481
Ravi Ram Avatar asked Mar 20 '13 15:03

Ravi Ram


People also ask

How to install Emmet in Sublime Text 2?

and type: install package and press Enter. Now we can install packages, since we want to install Emmet, you simply type Emmet and you select: Emmet (ex-Zen coding) for Sublime Text package. And that's it. After selecting the package, Emmet will install and you'll get a notification after it's done.


1 Answers

You can use Ctrl+E to expand abbreviations anywhere: https://github.com/sergeche/emmet-sublime#available-actions

Overriding Tab key for <script> tag (hence, for JavaScript syntax) is not a good idea because it will break your JS snippets and completions.

like image 62
Sergey Chikuyonok Avatar answered Oct 13 '22 22:10

Sergey Chikuyonok