All Projects → Delapouite → emmet-cli

Delapouite / emmet-cli

Licence: other
Emmet command line interface

Programming Languages

shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to emmet-cli

kakoune.cr
A command-line tool for Kakoune
Stars: ✭ 42 (+55.56%)
Mutual labels:  kakoune
powerline.kak
Kakoune modeline, but with passion
Stars: ✭ 49 (+81.48%)
Mutual labels:  kakoune
kak-ansi
Kakoune support for rendering ANSI-colored text.
Stars: ✭ 30 (+11.11%)
Mutual labels:  kakoune
kaktree
File explorer side panel for Kakoune
Stars: ✭ 39 (+44.44%)
Mutual labels:  kakoune
kakoune-wiki
Personal wiki plugin for Kakoune
Stars: ✭ 53 (+96.3%)
Mutual labels:  kakoune
emma.css
🍴 Emma.css { utility-classes: emmet-like; }
Stars: ✭ 53 (+96.3%)
Mutual labels:  emmet
luar
Script Kakoune using Lua
Stars: ✭ 33 (+22.22%)
Mutual labels:  kakoune
auto-pairs.kak
Auto-pairing of characters for Kakoune
Stars: ✭ 62 (+129.63%)
Mutual labels:  kakoune
elmmet
VS Code extension to compile emmet snippets to composition of elm functions
Stars: ✭ 17 (-37.04%)
Mutual labels:  emmet
magento-advanced-code-editor
An advanced code editor that'll make it much easier to write clean markup for CMS pages, static blocks, product pages and Transactional Emails.
Stars: ✭ 19 (-29.63%)
Mutual labels:  emmet
Kakoune
mawww's experiment for a better code editor
Stars: ✭ 7,593 (+28022.22%)
Mutual labels:  kakoune
vscode-inline-html
🎨 Adding Syntax Highlighting, Emmet, IntelliSense support for ES6 Template Strings in Visual Studio Code.
Stars: ✭ 31 (+14.81%)
Mutual labels:  emmet
emmet-monaco
Emmet support for monaco-editor
Stars: ✭ 19 (-29.63%)
Mutual labels:  emmet
kakoune-find
Find and replace on open buffers
Stars: ✭ 30 (+11.11%)
Mutual labels:  kakoune
one.kak
Atom "One" color schemes for Kakoune.
Stars: ✭ 19 (-29.63%)
Mutual labels:  kakoune
smarttab.kak
Automatic handling different styles of indentation and alignment.
Stars: ✭ 52 (+92.59%)
Mutual labels:  kakoune
ndslvim
专用于C-family和web前端开发的vim配置(其实通用性也还不错啦)
Stars: ✭ 14 (-48.15%)
Mutual labels:  emmet
snippet.kak
Snippets integration for Kakoune
Stars: ✭ 23 (-14.81%)
Mutual labels:  kakoune
py-emmet
Emmet abbreviation parser and expander, implemented in Python
Stars: ✭ 32 (+18.52%)
Mutual labels:  emmet
kakoune-colors
Color schemes for kakoune
Stars: ✭ 15 (-44.44%)
Mutual labels:  kakoune

emmet-cli

emmet command line interface.

Usage

$ emmet abbr
$ echo abbr | emmet

Examples:

$ emmet '#foo>span.bar*3'

outputs on stdout:

<div id="foo">
  <span class="bar"></span>
  <span class="bar"></span>
  <span class="bar"></span>
</div>

$ echo '!' | emmet

outputs on stdout:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
</head>
<body>
	
</body>
</html>

Use the -p flag to include placeholders in the output:

$ echo '#foo>span.bar*3' | emmet -p

outputs on stdout:

<div id="foo">
	<span class="bar">${1}</span>
	<span class="bar">${2}</span>
	<span class="bar">${3}</span>
</div>

These syntax should be compatible with snippets formats like the one used by lsp servers

Install

$ npm i -g emmet-cli
$ yarn global add emmet-cli

About

emmet is a great plugin available in many modern code editors. It aims mainly at working with HTML easier.

It's written in JavaScript so there's no easy way run it without node.js.

This module is currently a dead simple (like 10 lines of code) way to use the compiler as a CLI. It uses a few modules from @emmet-io which is an effort for emmet 2.x to decouple all its internal bits.

My main usage currently is with kakoune's ! command which blindly insert the output of emmet into the current buffer or the | command which pipes selections contents to emmet's stdin.

In the future, I'll try to improve this scenario further by combining with cool stuff like phantom selectons.

According to its README, the HTML matcher would be a nice way to grab coordinates that may be turned into text-objects, but the findPair function is nowhere to be found (yet).

See Also

License

ISC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].