Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Delapouite/emmet-cli
Emmet command line interface
https://github.com/Delapouite/emmet-cli
emmet kakoune
Last synced: 29 days ago
JSON representation
Emmet command line interface
- Host: GitHub
- URL: https://github.com/Delapouite/emmet-cli
- Owner: Delapouite
- Created: 2018-05-14T10:46:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-09T03:45:57.000Z (about 1 year ago)
- Last Synced: 2024-11-01T06:35:12.235Z (about 1 month ago)
- Topics: emmet, kakoune
- Language: Shell
- Size: 15.6 KB
- Stars: 30
- Watchers: 6
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-for-oneliner - emmet-cli - A command to expand emmet expression (HTML / Open USP Tsukubai)
README
# emmet-cli
[emmet](https://emmet.io/) command line interface.
## Usage
```
$ emmet abbr
$ echo abbr | emmet
```Examples:
```
$ emmet '#foo>span.bar*3'
```outputs on `stdout`:
```
```
```
$ echo '!' | emmet
```outputs on `stdout`:
```
Document
```
Use the `-p` flag to include placeholders in the output:
```
$ echo '#foo>span.bar*3' | emmet -p
```outputs on `stdout`:
```
```These syntax should be compatible with snippets formats like the
one used by [lsp servers](https://github.com/Microsoft/language-server-protocol/blob/master/snippetSyntax.md)## 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](https://www.npmjs.com/~emmetio) which
is an effort for emmet 2.x to decouple all its internal bits.- https://www.npmjs.com/package/@emmetio/expand-abbreviation
- https://www.npmjs.com/package/@emmetio/snippetsMy main usage currently is with [kakoune](http://kakoune.org)'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](https://github.com/occivink/kakoune-phantom-selection).According to its README, the [HTML matcher](https://www.npmjs.com/package/@emmetio/html-matcher)
would be a nice way to grab coordinates that may be turned into [text-objects](https://github.com/Delapouite/kakoune-text-objects),
but the `findPair` function is nowhere to be found (yet).## See Also
- [kakoune-snippets](https://github.com/JJK96/kakoune-snippets)
## License
ISC