### Install Emmet Plugin Dependencies (Shell) Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md This shell command installs the necessary dependencies for developing with the Emmet Sublime Text plugin. It uses pip to install packages listed in `requirements.txt` and places them in the current directory, which is essential for working with the plugin's source code. ```sh pip install -r requirements.txt -t . ``` -------------------------------- ### Emmet CSS Property Shortcut Example Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md Shows an example of Emmet's CSS property shortcut syntax. This feature allows for rapid input of CSS properties and values using a condensed format. The example `bd1-s#f.5` expands into a `border` property with specific pixel width, solid style, and a semi-transparent white color. ```css border: 1px solid rgba(255, 255, 255, 0.5); ``` -------------------------------- ### CSS Abbreviation Syntax Examples (CSS) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Illustrates Emmet's CSS abbreviation syntax for rapid CSS authoring. Includes shorthand property names, value shortcuts, vendor prefixes, color values, and more. ```css /* Property shortcuts */ m10 → margin: 10px; p20-30 → padding: 20px 30px; w100p → width: 100%; h50vh → height: 50vh; /* Multiple values: m10-20-30-40 */ margin: 10px 20px 30px 40px; /* Vendor prefixes (auto-generated) */ -transform → -webkit-transform: ; -ms-transform: ; transform: ; /* Color values */ c#f → color: #fff; bgc#3 → background-color: #333; c#f.5 → color: rgba(255, 255, 255, 0.5); /* Font shortcuts */ fz16 → font-size: 16px; fw700 → font-weight: 700; ff:a → font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; /* Display/positioning */ d:f → display: flex; d:g → display: grid; pos:a → position: absolute; t0 → top: 0; l50p → left: 50%; /* Flexbox shortcuts */ jc:c → justify-content: center; ai:c → align-items: center; fx1 → flex: 1; /* Border shortcuts */ bd1-s#f → border: 1px solid #fff; bdr5 → border-radius: 5px; /* Box shadow */ bxsh:n → box-shadow: none; bxsh0-0-5-#000 → box-shadow: 0 0 5px #000; /* Transitions and animations */ trs → transition: all 0.3s ease; anim:n → animation: name duration timing-function; ``` -------------------------------- ### HTML Abbreviation Syntax Examples (HTML) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Demonstrates Emmet's CSS selector-like syntax for generating HTML structures. Supports nesting, multiplication, grouping, and dynamic content generation. ```html
Click me

Features

``` -------------------------------- ### Emmet Abbreviation Example (Text) Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md Illustrates a typical Emmet abbreviation used for generating HTML. This syntax is similar to CSS selectors, enabling quick creation of complex HTML structures. The example shows how to define an unordered list with an ID, nested list items with classes and dynamic numbering, and links with dynamic text. ```text ul#nav>li.item$*4>a{Item $} ``` -------------------------------- ### Emmet Abbreviation Expansion Example Source: https://github.com/emmetio/sublime-text-plugin/blob/master/messages/install.txt Demonstrates how Emmet abbreviations are expanded into HTML code. This functionality is core to Emmet's purpose of accelerating web development by reducing typing. ```text ul#nav>li.item$*4>a{Item $} ``` ```html ``` -------------------------------- ### Expand Emmet Abbreviation (HTML) Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md Demonstrates expanding a CSS-like abbreviation into an HTML structure. This functionality is core to Emmet, allowing rapid generation of HTML code from concise expressions. The example shows a `ul` with an ID, containing list items with classes and links, with dynamic numbering. ```html ``` -------------------------------- ### Select Item Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Cycles through important code parts like tag names, attributes, and attribute values for quick selection and editing. Configured via JSON key bindings, with an optional 'previous' argument. ```json // Select next item { "keys": ["shift+super+."], "command": "emmet_select_item" } // Select previous item { "keys": ["shift+super+,"], "command": "emmet_select_item", "args": { "previous": true } } // Example sequence on:
// 1st select: [div] // 2nd select: [class="container"] // 3rd select: class="[container]" // 4th select: [id="main"] // 5th select: id="[main]" ``` -------------------------------- ### JSX Abbreviations with Emmet 2 in Sublime Text Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Demonstrates various JSX abbreviation syntaxes supported by Emmet 2, including default prefix requirements, camel-cased components, module notation, and expression attributes. It also shows how to configure prefix requirements and custom prefix characters. ```jsx // JSX abbreviations require < prefix by default // Type:
// Camel-cased components: // Module notation: // Expression attributes: // Complex JSX: h1{Welcome}+p{Content}+button[onClick={handleClick}]{Click}

Welcome

Content

// Configuration to disable prefix requirement (not recommended): // "jsx_prefix": false // Custom prefix character: // "jsx_prefix": ">" ``` -------------------------------- ### Go to Edit Point Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Navigates to the next or previous "edit point" in HTML/CSS, which are positions like empty attributes or between tags. Configured with JSON key bindings, with an optional 'previous' argument. ```json // Go to next edit point { "keys": ["ctrl+alt+right"], "command": "emmet_go_to_edit_point" } // Go to previous edit point { "keys": ["ctrl+alt+left"], "command": "emmet_go_to_edit_point", "args": { "previous": true } } // Edit points include: // - Empty tag content:
|
// - Empty attribute values: // - Between adjacent tags: |
``` -------------------------------- ### Update Image Size Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Automatically updates the width and height attributes of `` tags or CSS `background` properties based on the actual image file dimensions. Configured via a JSON key binding. ```json // Key binding for update image size { "keys": ["shift+ctrl+i"], "command": "emmet_update_image_size" } // Example: // Before: // After: // Also works in CSS: // Before: background: url(image.png); // After: background: url(image.png); width: 200px; height: 100px; ``` -------------------------------- ### Go to Matching Tag Pair Command (JSON Key Binding) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Provides a key binding for the `emmet_go_to_tag_pair` command in Sublime Text. This command allows users to quickly jump between the opening and closing tags of a matching HTML or XML pair. When the cursor is within a tag, it navigates to its corresponding counterpart. ```json // Key binding for go to tag pair { "keys": ["ctrl+shift+t"], "command": "emmet_go_to_tag_pair" } // Example: //
| <- cursor here //

Content

//
// After command: cursor moves to
``` -------------------------------- ### Emmet 2 Configuration Settings (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt This JSON configuration file allows customization of Emmet 2's behavior within Sublime Text. It controls abbreviation capturing, preview, syntax support, output formatting, and custom snippets. ```json { // Enable/disable automatic abbreviation capturing // Values: true, false, "markup", "stylesheet" "auto_mark": true, // Enable/disable abbreviation preview // Values: true, false, "markup", "stylesheet" "abbreviation_preview": true, // JSX abbreviation prefix (set to true for "<" or custom string) "jsx_prefix": true, // Expand abbreviation with Tab key "tab_expand": true, // Enable tag preview for closing tags "tag_preview": false, // Output style: "html", "xhtml", "xml" "markup_style": "html", // Attribute quote style: "double" or "single" "attribute_quotes": "double", // Enable BEM notation support "bem": false, // Shorten HEX colors when possible "short_hex": true, // Custom snippets and options configuration "config": { "markup": { "snippets": { "foo": "ul.foo>li.foo-item*4" }, "options": { "output.tagCase": "upper" } }, "stylesheet": { "snippets": { "mycolor": "color: #f00" } }, "html": { "snippets": { "doc": "html>head>title+body" } } } } ``` -------------------------------- ### Convert Data URL Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Converts image references between file paths and base64-encoded data URLs in both HTML and CSS contexts. Configured via a JSON key binding. ```json // Key binding for convert data URL { "keys": ["shift+ctrl+d"], "command": "emmet_convert_data_url" } // HTML example: // Before: // After: // CSS example: // Before: background: url(icon.png); // After: background: url(data:image/png;base64,iVBORw0KGgo...); ``` -------------------------------- ### Wrap with Emmet Abbreviation Command (JSON Key Binding) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Sets up a key binding for the `emmet_wrap_with_abbreviation` command, allowing users to wrap selected content or the current tag with an Emmet abbreviation. This command opens an input panel for entering the abbreviation, providing live preview. It supports wrapping with simple tags or complex nested structures. ```json // Key binding for wrap with abbreviation { "keys": ["ctrl+w"], "command": "emmet_wrap_with_abbreviation", "context": [{"key": "setting.is_widget", "operand": false}] } // Example usage: // 1. Select HTML content:

Hello

World

// 2. Run command // 3. Type: div.wrapper // 4. Result:

Hello

World

// Wrapping with nested structure: // Select: Item 1, Item 2, Item 3 // Enter: ul>li* // Result: //
    //
  • Item 1
  • //
  • Item 2
  • //
  • Item 3
  • //
``` -------------------------------- ### Configure Emmet Snippets and Options in Sublime Text Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md This JSON configuration demonstrates how to add custom Emmet snippets and adjust options globally or for specific syntaxes like HTML and CSS. It allows for defining aliases for Emmet abbreviations and fine-tuning Emmet's behavior. ```json { "config": { "markup": { "snippets": { "foo": "ul.foo>li.foo-item*4" }, "options": { "output.tagCase": "upper" } }, "html": { "snippets": { "myhtml": "main.my-html>section" } }, "stylesheet": { "snippets": { "foo": "foo-bar" }, "options": { "stylesheet.shortHex": false } }, "css": { "snippets": { "prop": "some-prop:${value}" } } } } ``` -------------------------------- ### Balance HTML/XML Tag Pairs Command (JSON Key Binding) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Defines key bindings for the `emmet_balance` command, which selects matching HTML/XML tag pairs. The 'outward' direction expands the selection to the parent tag, while the 'inward' direction contracts it to child elements. This functionality also applies to CSS selectors and properties. ```json // Balance outward - expand selection to parent tag { "keys": ["ctrl+d"], "command": "emmet_balance", "args": { "direction": "outward" } } // Balance inward - contract selection to child elements { "keys": ["ctrl+j"], "command": "emmet_balance", "args": { "direction": "inward" } } // Example with HTML: // Start:

He|llo

(| = cursor) // After outward balance:

[Hello]

// After another outward:
[

Hello

]
// After another outward: [

Hello

] ``` -------------------------------- ### Split/Join Tag Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Toggles between self-closing and paired tag forms for HTML elements. Converts `
` to `
` and vice versa. This is configured via a JSON key binding. ```json // Key binding for split/join tag { "keys": ["shift+super+'"], "command": "emmet_split_join_tag" } // Example split: // Before:
// After:
// Example join: // Before: // After: ``` -------------------------------- ### Evaluate Math Expression Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Evaluates mathematical expressions found on the current line and replaces them with the calculated result. Configured via a JSON key binding. ```json // Key binding for evaluate math { "keys": ["shift+super+y"], "command": "emmet_evaluate_math" } // Examples: // Before: width: 100/2px; // After: width: 50px; // Before: margin: 10+5*2; // After: margin: 20; ``` -------------------------------- ### Rename Tag Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Enables simultaneous editing of both opening and closing HTML tags by placing multiple cursors on the tag names. Configured via a JSON key binding. ```json // Key binding for rename tag { "keys": ["super+shift+k"], "command": "emmet_rename_tag" } // Example: //
Content
// Run command, both "div" tags are selected // Type "section" to rename both simultaneously // Result:
Content
``` -------------------------------- ### Enter Emmet Abbreviation Mode Command (JSON Key Binding) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Configures a key binding for the `emmet_enter_abbreviation` command, which activates explicit abbreviation mode in Sublime Text. In this mode, typed text is treated as an Emmet abbreviation with live preview. A visual indicator (`⋮>`) signals that abbreviation mode is active. Pressing Tab or Enter expands the abbreviation, while Esc cancels. ```json // Key binding to enter abbreviation mode { "keys": ["ctrl+."], "command": "emmet_enter_abbreviation" } // Usage flow: // 1. Press Ctrl+. to enter abbreviation mode // 2. Type abbreviation (e.g., "div.container>ul>li*3") // 3. See live preview of expanded code // 4. Press Tab or Enter to expand, Esc to cancel ``` -------------------------------- ### Increment/Decrement Number Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Increases or decreases numeric values at the cursor by configurable amounts (0.1, 1, or 10). Configured using JSON key bindings with a 'delta' argument. ```json // Increment by 1 { "keys": ["ctrl+up"], "command": "emmet_increment_number", "args": { "delta": 1 } } // Decrement by 1 { "keys": ["ctrl+down"], "command": "emmet_increment_number", "args": { "delta": -1 } } // Increment by 0.1 (for opacity, etc.) { "keys": ["alt+up"], "command": "emmet_increment_number", "args": { "delta": 0.1 } } // Decrement by 10 (for quick adjustments) { "keys": ["shift+alt+down"], "command": "emmet_increment_number", "args": { "delta": -10 } } // Example: // Before: margin: 10px; // Press Ctrl+Up // After: margin: 11px; ``` -------------------------------- ### Configure Tab Expansion in Sublime Text (JSON) Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md This JSON configuration snippet allows users to re-enable the behavior of expanding Emmet abbreviations using the Tab key in Sublime Text. It requires setting `auto_mark` to `false` in Emmet's settings and adding this key binding. This configuration targets specific contexts within Sublime Text to ensure correct abbreviation expansion. ```json { "keys": ["tab"], "command": "emmet_expand_abbreviation", "args": { "tab": true }, "context": [ { "key": "emmet_capture_abbreviation" }, { "key": "selection_empty" }, { "key": "has_next_field", "operand": false }, { "key": "auto_complete_visible", "operand": false }, { "key": "selector", "operand": "source.css, source.sass, source.less, source.scss, source.stylus, source.postcss, source.jade, text.jade, source.pug, text.pug, text.slim, text.xml, text.html - source, text.haml, text.scala.html, source string" } ] } ``` -------------------------------- ### Emmet Abbreviation Expansion Trigger (Sublime Text) Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md Describes how to trigger Emmet abbreviation expansion in Sublime Text. Users can type an abbreviation and press Tab or Ctrl+E. The plugin also acts as an autocomplete provider, capturing abbreviations as you type and showing a preview. Invoking autocomplete (Ctrl+Space) within a captured abbreviation expands it. ```text Tab or Ctrl-E ``` -------------------------------- ### Expand Emmet Abbreviation Command (JSON Key Binding) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Defines key bindings for the `emmet_expand_abbreviation` command in Sublime Text. This command expands Emmet abbreviations at the cursor position and supports single-cursor, multi-cursor, and context-aware tab expansions. The 'force' argument can be used to expand without active abbreviation tracking. ```json // Key binding in .sublime-keymap file { "keys": ["ctrl+e"], "command": "emmet_expand_abbreviation" } // With force argument to expand without requiring active abbreviation tracking { "keys": ["ctrl+shift+e"], "command": "emmet_expand_abbreviation", "args": { "force": true } } // Tab key expansion with context conditions { "keys": ["tab"], "command": "emmet_expand_abbreviation", "args": { "tab": true }, "context": [ { "key": "emmet_abbreviation" }, { "key": "emmet_tab_expand" }, { "key": "num_selections", "operand": 1 } ] } ``` -------------------------------- ### Configure Emmet: Enter Abbreviation Mode Keyboard Shortcut Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md This JSON snippet configures a keyboard shortcut in Sublime Text to enter Emmet's explicit abbreviation mode. This mode allows manual expansion of abbreviations after typing them. The default shortcut is Ctrl+. ```json { "keys": ["ctrl+."], "command": "emmet_enter_abbreviation" } ``` -------------------------------- ### Configure Emmet: Expand Abbreviation Keyboard Shortcut Source: https://github.com/emmetio/sublime-text-plugin/blob/master/README.md This JSON snippet configures a keyboard shortcut in Sublime Text to manually expand Emmet abbreviations. It's useful when auto-capture is disabled. The default shortcut is Ctrl+E. ```json { "keys": ["ctrl+e"], "command": "emmet_expand_abbreviation" } ``` -------------------------------- ### Toggle Comment Command (JSON) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt An enhanced toggle comment action that intelligently comments/uncomments HTML tags or CSS rules based on cursor context. This command overrides the default toggle_comment when enabled in settings. ```json // This command overrides the default toggle_comment when enabled // Enable in settings: "toggle_comment": true // Example HTML: // Before:
Content
// After: // Example CSS: // Before: .class { color: red; } // After: /* .class { color: red; } */ ``` -------------------------------- ### Remove HTML Tag Command (JSON Key Binding) Source: https://context7.com/emmetio/sublime-text-plugin/llms.txt Configures a key binding for the `emmet_remove_tag` command, which removes the surrounding HTML tag while preserving its content. The command intelligently identifies the matching tag pair and removes both the opening and closing tags. ```json // Key binding for remove tag { "keys": ["super+'"], "command": "emmet_remove_tag" } // Example: // Before:

Hello World

// Cursor inside
, run command // After:

Hello World

``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.