Snippets to insert escaped Emoji code into HTML, CSS, JavaScript, JSON, Python, Ruby and Twig
emoji-code
Snippets to insert escaped Emoji code into a variety of languages, including:
- CSS
- CoffeeScript
- HTML
- JSON
- JavaScript
- LiveScript
- Python
- Ruby
- Svelte
- Twig
- TypeScript
- Github Flavored Markdown 👋
Note Github supports emojis out of the box (e.g. :wave:
), so there is no need to paste Unicode characters.
This package is also available for Sublime Text and Visual Studio Code.
Screenshot of completions in Atom with one-light-ui
Installation
apm
Install emoji-code
from Atom's Package Manager or the command-line equivalent:
$ apm install emoji-code
Using Git
Change to your Atom packages directory:
# Windows
$ cd %USERPROFILE%\.atom\packages
# Linux & macOS
$ cd ~/.atom/packages/
Clone repository as emoji-code
:
$ git clone https://github.com/idleberg/atom-emoji-code emoji-code
Inside the cloned directory, install Node dependencies:
$ yarn || npm install
Usage
All emojis are prefixed with ji
, following the string of the official Unicode terminology.
Examples:
Let's say, you want to insert the 😄 emoji
- HTML:
ji:grinning-face
becomes😀
- CSS:
ji:grinning-face
becomescontent: '\1F600';
- JavaScript:
ji:grinning-face
becomes\u{1F600}
- Python:
ji:grinning-face
becomes\U0001F600
- Ruby:
ji:grinning-face
becomes\u{1F600}
Keep in mind that Atom supports fuzzy completion, inviting you to use abbreviation of your preference.
License
This work is licensed under the The MIT License.