<?xml version="1.0" encoding="utf-8" ?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:tt="http://teletype.in/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"><title>Sergey Chikuyonok</title><author><name>Sergey Chikuyonok</name></author><id>https://teletype.in/atom/chikuyonok</id><link rel="self" type="application/atom+xml" href="https://teletype.in/atom/chikuyonok?offset=0"></link><link rel="alternate" type="text/html" href="https://teletype.in/@chikuyonok?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=chikuyonok"></link><link rel="next" type="application/rss+xml" href="https://teletype.in/atom/chikuyonok?offset=10"></link><link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></link><updated>2026-04-05T03:59:14.337Z</updated><entry><id>chikuyonok:emmet2-sublime-text</id><link rel="alternate" type="text/html" href="https://teletype.in/@chikuyonok/emmet2-sublime-text?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=chikuyonok"></link><title>Emmet 2 for Sublime Text</title><published>2020-08-02T19:39:07.846Z</published><updated>2020-08-23T21:25:34.660Z</updated><summary type="html">&lt;img src=&quot;https://teletype.in/files/4e/40/4e401e70-358c-4e25-b042-72f6114375a7.gif&quot;&gt;After a few month of active development, I’d like to announce a new version of Emmet plugin for Sublime Text!</summary><content type="html">
  &lt;p&gt;After a few month of active development, I’d like to announce a &lt;a href=&quot;https://github.com/emmetio/sublime-text-plugin&quot; target=&quot;_blank&quot;&gt;new version of Emmet plugin for Sublime Text&lt;/a&gt;!&lt;/p&gt;
  &lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;:&lt;/em&gt; &lt;em&gt;new Emmet is much faster, smaller and better. It doesn’t hijack Tab key, provides interactive preview of expanded abbreviation and has improved JSX support. New plugin is in beta stage and &lt;a href=&quot;https://github.com/emmetio/sublime-text-plugin#installation&quot; target=&quot;_blank&quot;&gt;must be installed from external repository&lt;/a&gt;.&lt;/em&gt; &lt;em&gt;And if you like Emmet, please support it via &lt;a href=&quot;https://github.com/sponsors/emmetio&quot; target=&quot;_blank&quot;&gt;GitHub Sponsors&lt;/a&gt;: it helps me maintain and support project further.&lt;/em&gt;&lt;/blockquote&gt;
  &lt;p&gt;8 years ago, a &lt;a href=&quot;https://packagecontrol.io/packages/Emmet&quot; target=&quot;_blank&quot;&gt;first version of Emmet&lt;/a&gt; was released and became one of &lt;a href=&quot;https://packagecontrol.io/browse/popular&quot; target=&quot;_blank&quot;&gt;most downloaded package&lt;/a&gt; for Sublime Text editor. Back these days, when Emmet was a new kid on the block, I’ve tried to support as much editors as possible. Since most editors are extended with JavaScript, I wanted to re-use existing JS code base for Sublime Text, which is extended with Python.&lt;/p&gt;
  &lt;p&gt;While this solution allowed me to implement Sublime Text plugin rather quickly and (theoretically) ease further plugin support, it had too much downsides: &lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;it required large PyV8 binary to be downloaded separately; &lt;/li&gt;
    &lt;li&gt;running JS inside Python caused major performance and stability degradation;&lt;/li&gt;
    &lt;li&gt;it doesn’t allow deeper integration with Sublime Text features.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;A new Emmet code base is a complete rethink of architecture and how users should interact with extension.&lt;/p&gt;
  &lt;h2&gt;Play nice with Tab key&lt;/h2&gt;
  &lt;p&gt;Almost all users want to expand Emmet abbreviations with &lt;code&gt;Tab&lt;/code&gt; key, just like regular snippets. The problem is that simply binding &lt;code&gt;Tab&lt;/code&gt; key to &lt;em&gt;Expand Emmet Abbreviation&lt;/em&gt; action prevents users from using native snippets. Moreover, it breaks another essential editor features like indent, move to next tabstop etc.&lt;/p&gt;
  &lt;p&gt;In Emmet 2 plugin, a new paradigm called &lt;em&gt;abbreviation capturing&lt;/em&gt; is used. When you start typing a word (basically, any word can be an abbreviation!), Emmet begins to track it (displayed as subtle &lt;u&gt;underline&lt;/u&gt;). So, an underlined word means Emmet is able to expand it as abbreviation: just hit &lt;code&gt;Tab&lt;/code&gt; to do so!&lt;/p&gt;
  &lt;p&gt;If you just typing a regular text, most likely you’ll enter some invalid abbreviation character like space or comma: doing so at the end of captured abbreviation will automatically reset it like nothing happens. Or you can just hit &lt;code&gt;Esc&lt;/code&gt; key to forcibly reset abbreviation and use &lt;code&gt;Tab&lt;/code&gt; key to expand native snippets or insert indentation.&lt;/p&gt;
  &lt;p&gt;But the coolest thing is that when abbreviation becomes complex (contains more that one element), you’ll see an expanded abbreviation preview, which is updated live as you edit abbreviation:&lt;/p&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/4e/40/4e401e70-358c-4e25-b042-72f6114375a7.gif&quot; width=&quot;640&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;Remember that Emmet expands abbreviation by &lt;code&gt;Tab&lt;/code&gt; key only if it’s captured (has subtle underline)! Otherwise, &lt;code&gt;Tab&lt;/code&gt; key acts normally.&lt;/p&gt;
  &lt;h2&gt;Autocomplete provider&lt;/h2&gt;
  &lt;p&gt;Emmet also acts as autocomplete provider: if you already have abbreviation in you editor and want to expand it, move caret at the end of abbreviation and invoke autocomplete popup (&lt;code&gt;Ctrl-Space&lt;/code&gt; by default):&lt;/p&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/9a/0c/9a0c3cc9-7f3d-4342-8ec0-01e15966d605.gif&quot; width=&quot;640&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;Note that by default Sublime Text inserts a single completion (e.g. will immediately expand abbreviation). If you want to capture abbreviation and continue it’s editing with interactive preview, run new &lt;code&gt;Emmet: Capture Abbreviation&lt;/code&gt; action.&lt;/p&gt;
  &lt;h2&gt;Improved JSX support&lt;/h2&gt;
  &lt;blockquote&gt;Make sure your document syntax in Sublime Text is set to JSX, not JavaScript.&lt;/blockquote&gt;
  &lt;p&gt;Since any word can be an Emmet abbreviation, capturing it that same way as in HTML would cause too much distraction when you write regular JavaScript. To overcome this problem, in JSX you must explicitly prefix abbreviation with &lt;code&gt;&amp;lt;&lt;/code&gt; character:&lt;/p&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/c2/50/c2507ce9-24f1-49f8-a476-ce7c332ab2fd.gif&quot; width=&quot;640&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt; Also, Emmet has some internal improvements for JSX:&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;Detect camel-cased module notation: &lt;code&gt;Foo.Bar&lt;/code&gt; will be expanded to &lt;code&gt;&amp;lt;Foo.Bar&amp;gt;&amp;lt;/Foo.Bar&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;Foo className=&amp;quot;Bar&amp;quot;&amp;gt;&amp;lt;/Foo&amp;gt;&lt;/code&gt;;&lt;/li&gt;
    &lt;li&gt;Expression attributes: &lt;code&gt;div[class={getClass(&amp;#x27;foo&amp;#x27;)}]&lt;/code&gt;.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;h2&gt;CSS support&lt;/h2&gt;
  &lt;p&gt;In CSS, Sublime Text uses slightly different autocomplete behaviour: it displays completions by default and doesn’t re-populate completions list as you type further, which prevents Emmet from building proper dynamic completion. To overcome this issue, Emmet displays abbreviation preview right after caret as &lt;em&gt;phantom&lt;/em&gt;:&lt;/p&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/ac/24/ac24ca90-d3ad-4328-a14d-6fd315c42d31.gif&quot; width=&quot;640&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;In Emmet 2, CSS abbreviations are enhanced with dynamic color snippets: you can type, for example, &lt;code&gt;#f.5&lt;/code&gt; to quickly get &lt;code&gt;rgba(255, 255, 255, 0.5)&lt;/code&gt;.&lt;/p&gt;
  &lt;h2&gt;Tag preview&lt;/h2&gt;
  &lt;p&gt;Another new feature of Emmet 2 is inline preview of opening tag. When you move caret inside &lt;em&gt;name of closing tag&lt;/em&gt; and its matching open tag &lt;em&gt;is not visible on screen &lt;/em&gt;you’ll see an inline tag preview:&lt;/p&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/3b/16/3b167d3b-6299-440e-a1e1-70da241cac30.gif&quot; width=&quot;640&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;Click on this preview to jump to opening tag.&lt;/p&gt;
  &lt;h2&gt;More actions&lt;/h2&gt;
  &lt;p&gt;All the rest actions like &lt;a href=&quot;https://docs.emmet.io/actions/wrap-with-abbreviation/&quot; target=&quot;_blank&quot;&gt;Wrap with Abbreviation&lt;/a&gt;, &lt;a href=&quot;https://docs.emmet.io/actions/match-pair/&quot; target=&quot;_blank&quot;&gt;Balance&lt;/a&gt;, &lt;a href=&quot;https://docs.emmet.io/actions/select-item/&quot; target=&quot;_blank&quot;&gt;Select Item&lt;/a&gt; etc. are also supported but doesn’t have default key bindings: it caused too much trouble for new users when Emmet overrides actions from other plugins. You should either invoke these actions via Command Palette or &lt;a href=&quot;https://www.sublimetext.com/docs/3/key_bindings.html&quot; target=&quot;_blank&quot;&gt;create your own keyboard shortcuts&lt;/a&gt; (see &lt;a href=&quot;https://github.com/emmetio/sublime-text-plugin/blob/master/Default.sublime-commands&quot; target=&quot;_blank&quot;&gt;Default.sublime-commands&lt;/a&gt; file for list of available actions). &lt;/p&gt;
  &lt;blockquote&gt;A final Sublime Text plugin will provide web-based UI for fine-tuning Emmet options and key bindings.&lt;/blockquote&gt;
  &lt;h2&gt;Installation&lt;/h2&gt;
  &lt;p&gt;You can install Emmet from &lt;a href=&quot;https://packagecontrol.io/&quot; target=&quot;_blank&quot;&gt;Package Control&lt;/a&gt;:&lt;/p&gt;
  &lt;ol&gt;
    &lt;li&gt;From &lt;code&gt;Command Palette&lt;/code&gt;, run &lt;code&gt;Package Control: Install Package&lt;/code&gt; command.&lt;/li&gt;
    &lt;li&gt;In opened packages list, find &lt;code&gt;Emmet&lt;/code&gt; package and install it.&lt;/li&gt;
  &lt;/ol&gt;
  &lt;p&gt;If you’re unable to find &lt;code&gt;Emmet&lt;/code&gt; package on last step or installed package doesn’t work as expected, restart Sublime Text and try again.&lt;/p&gt;
  &lt;hr /&gt;
  &lt;h2&gt;Emmet needs your support! 🎉&lt;/h2&gt;
  &lt;p&gt;Emmet is free and open-source project, developed by a single person on my spare time. It’s very hard for me to maintain project of such scale and popularity yet pay my bills.&lt;/p&gt;
  &lt;p&gt;If you find Emmet useful for you or your company or you want to support new editor or future, please consider project sponsorship via &lt;a href=&quot;https://github.com/sponsors/emmetio&quot; target=&quot;_blank&quot;&gt;GitHub Sponsors&lt;/a&gt;! Every donation makes me worry less about money and focus on Emmet features and improvements.&lt;/p&gt;

</content></entry></feed>