• Link to X Link to X Link to X
  • Link to Facebook Link to Facebook Link to Facebook
  • Link to Youtube Link to Youtube Link to Youtube
  • Link to Reddit Link to Reddit Link to Reddit
  • Link to Rss Link to Rss Link to Rss
  • Blog
  • Support
    • FAQ
    • Help (HTML)
    • Manual (PDF)
    • Forums (read-only)
    • Library (GitHub)
    • Update/Resend Registration Keys
    • Contact Us
  • About
    • About Emurasoft
    • Meet the Team
    • Other Products
    • Awards
    • Privacy Policy
    • Go to Emurasoft Customer Center
  • 🌐 English
    • 日本語
    • 한국어
    • Deutsch
    • 简体中文
    • 繁體中文
  • Download
  • Buy
  • Features
  • Menu Menu

How to Use Zen Coding

We often receive inquiries as to whether EmEditor supports Zen Coding. Zen Coding is the library that allows you to code HTML and other structured code format significantly faster. For example, the single line

div#page>div.logo+ul#navigation>li*5>a

can be expanded into

<div id="page">
	<div class="logo"></div>
	<ul id="navigation">
		<li><a href=""></a></li>
		<li><a href=""></a></li>
		<li><a href=""></a></li>
		<li><a href=""></a></li>
		<li><a href=""></a></li>
	</ul>
</div>

If you know the HTML structure you want to enter, using Zen Coding allows you to write code much faster than fully writing out the code.

EmEditor offers full support for Zen Coding

Zen Coding, developed by Sergey Chikuyonok and others, is released as a GNU license. The core of the library is developed both in JavaScript and Python 2.5+. One of the advantages of Zen Coding is that the core and the interface (controller) are developed separately in order to be used in various text editors. In other words, the library is designed so that the core can be reused without changes between text editors, and only the interface part must be re-written for different text editors. This modular design minimizes feature implementation variations and glitches between text editors.

Since EmEditor supports JavaScript, the text editor can easily support Zen Coding. In order to begin using Zen Coding in EmEditor, you only need to edit the interface portion of Zen Coding, since the core part needs few or no changes. The EmEditor developer finished porting Zen Coding into EmEditor in just two days. Once the interface is complete, only the core needs to be replaced when newer versions of Zen Coding become available, a far simpler process. Thus, you can use the newest features of Zen Coding without worrying about bugs or missing implementation.

Zen Coding for EmEditor Download

You can download Zen Coding for EmEditor from our Library under the Snippets category. Please install Zen Coding for EmEditor according to the Snippets plug-in method described in the ReadMe file. After installation, you will see a folder named Zen Coding in the Snippets custom bar, with 10 registered actions. Each action can be executed by pressing the shortcut key written in parenthesis after each item.

Zen Coding folder created in the Snippets custom bar.

Zen Coding folder created in the Snippets custom bar.

Zen Coding How To: Expand Abbreviation

Among the 10 actions, the most frequently used is the “Expand Abbreviation” action. This action expands a typed abbreviation into a full HTML code, similar to how CSS selector forms work. Its shortcut is assigned to the F12 key. To expand an abbreviation, type the abbreviation and then press F12. For instance, typing

div#name

and pressing F12 will expand the abbreviation to

<div id="name"></div>

# is used to specify the ID element of HTML. In order to specify a class, use . instead of #. For instance, type

div.name

and press F12 to get

<div class="name"></div>

Using > instead of . will specify a child element. For example,

table>tr>td

is expanded to

<table>
	<tr>
		<td></td>
	</tr>
</table>

If you use +, more than one element is expanded. For instance,

 p.one+p.two

becomes

<p class="one"></p>
<p class="two"></p>

Use [ ] to specify attributes. For instance,

p[title]

is expanded to

<p title=""></p>

Moreover, Zen Coding includes a filter feature, To specify a filter, use |. Typing

p.title|e

will expand it into

&lt;p class="title"&gt;&lt;/p&gt;

The e filter encodes three characters: >, <, and &, which can’t be used as XML literals. There are more filters available.

If you want to describe repeating elements, you can specify repeat times by using * and a number. For instance,

 p*3

is expanded to

<p></p>
<p></p>
<p></p>

Furthermore, by using $, you can include sequential numbers within the ID names of class names. For example, you can type

p.name-$*3

in order to get

<p class="name-1"></p>
<p class="name-2"></p>
<p class="name-3"></p>

Special abbreviations such as ul+, table+, and dl+ greatly reduce typing time. For instance,

ul+

is expanded to

<ul>
	<li></li>
</ul>

For more details, please refer to

  • Zen Coding Index
  • Filters

Moreover, there are many snippets available within Zen Coding. For instance, when HTML configuration is selected in EmEditor,

html:4t

is expanded to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title></title>
</head>
<body>

</body>
</html>

And when CSS configuration is selected, pressing F12 will expand

@i

to

@import url();

The list of available snippets are described in

  • HTML Elements
  • CSS Properties

There is a convenient cheatsheet available at

  • CheatSheet

Other Features

Expand Abbreviation is just one of many Zen Coding features. For details of all actions, please refer to:

  • Actions

Zen Coding allows you to make your HTML coding much more efficient. Please enjoy coding HTML and XML using Zen Coding for EmEditor!

← Snippets Plug-in Web Preview Plug-in →

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

You must be logged in to post a comment.

  • Text Editing
    • Batch Replace
    • Binary Editing
    • Bracket/Quotation Mark Auto-Complete
    • Clipboard History
    • Compare Documents
    • EditorConfig Support
    • Filter Bar
    • Find and Replace
    • Format Selection
    • Fuzzy Matching
    • Language Server Protocol Support
    • Multiple Selection Editing
      • How to use Vertical Editing
    • Number Range Expression for Find and Replace
    • Regular Expressions
    • Syntax Checker for HTML, CSS, JSON, XML
    • Syntax Highlighting
  • Powerful CSV Tools
    • Autofill
    • Combine Lines
    • Combine/Split Columns
    • CSV Converter
    • Custom CSV formats
    • Delete Duplicate Lines
    • Extract Columns
    • Extract Frequent Strings
    • Flash Fill
    • Freeze header
    • Insert lines/columns
    • Join CSV
    • Manage Columns
    • Numbering
    • Pivot table
    • Sort
    • Transpose
  • Large File Support
    • Fast Processing of Large Files
    • Large File Controller
    • Large Files up to 16 TB
    • Lightweight, multithreaded design
    • Split and Combine Files
  • User Experience
    • Configurations
    • Customizable Interface
    • Customizable toolbars
    • Document Groups
    • International language and locale support
    • Markers
    • Quick Launch
    • Split window
    • Start Window
    • Tabbed Design
    • Workspace Memory
  • Extensibility
    • AI Assisted Writing
    • AI Toolbar
    • Chat with AI
    • External Tools
    • Plug-ins
      • CommitList Plug-in
      • Explorer Plug-in
      • HTML Bar Plug-in
      • Open Documents Plug-in
      • Projects Plug-in
      • Search Plug-in
      • Snippets Plug-in
        • How to Use Zen Coding
      • Web Preview Plug-in
      • Word Complete Plug-in
      • Word Count Plug-in
    • Scriptable Macros
  • More Features
    • Base64
    • Bookmarks
    • Character Check
    • Character Code Value
    • Customer support
    • Drag and Drop
    • Error Handler and Crash Recovery
    • Fast 64-bit Build
    • Full Screen View
    • Grab Text
    • Half-width/Full-width conversion
    • HTML Character References
    • Jump
    • Markdown Editor
    • Marks
    • Matching Tag Highlight
    • Messaging (plug-in)
    • MIME Encoded-Word
    • Multiple File Encoding Conversions
    • Narrowing
    • Offline Registration
    • Outline
    • Percent-encoding
    • Pin to List
    • Portability Options
    • Privacy-first
    • Quick Start
    • Save to Protected Folder
    • Spellcheck
    • Status Window
    • Tooltip to show HTML/XML character references
    • Unicode Normalization
    • Unicode Support
    • Universal Character Name
    • Uppercase/Lowercase conversion
    • Wildcard Support
    • Windows 11/10 Compatibility
    • CSV
  • History
    • New in Version 26.2
    • New in Version 26.1
    • New in Version 26.0
    • New in Version 25.4
    • New in Version 25.3
    • New in Version 25.2
    • New in Version 25.1
    • New in Version 25.0
    • New in Version 24.5
    • New in Version 24.4
    • New in Version 24.3
    • New in Version 24.2
    • New in Version 24.1
    • New in Version 24.0
    • New in Version 23.1
    • New in Version 23.0
    • New in Version 22.5
    • New in Version 22.4
    • New in Version 22.3
    • New in Version 22.2
    • New in Version 22.1
    • New in Version 22.0
    • New in Version 21.9
    • New in Version 21.8
    • New in Version 21.7
    • New in Version 21.6
    • New in Version 21.5
    • New in Version 21.4
    • New in Version 21.3
    • New in Version 21.2
    • New in Version 21.1
    • New in Version 21.0
    • New in Version 20.9
    • New in Version 20.8
    • New in Version 20.7
    • New in Version 20.6
    • New in Version 20.5
    • New in Version 20.4
    • New in Version 20.3
    • New in Version 20.2
    • New in Version 20.1
    • New in Version 20.0
    • New in Version 19.9
    • New in Version 19.8
    • New in Version 19.7
    • New in Version 19.6
    • New in Version 19.5
    • New in Version 19.4
    • New in Version 19.3
    • New in Version 19.2
    • New in Version 19.1
    • New in Version 19.0
    • New in Version 18.9
    • New in Version 18.8
    • New in Version 18.7
    • New in Version 18.6
    • New in Version 18.5
    • New in Version 18.4
    • New in Version 18.3
    • New in Version 18.2
    • New in Version 18.1
    • New in Version 18.0
    • New in Version 17.9
    • New in Version 17.8
    • New in Version 17.7
    • New in Version 17.6
    • New in Version 17.5
    • New in Version 17.4
    • New in Version 17.3
    • New in Version 17.2
    • New in Version 17.1
    • New in Version 17.0
    • New in Version 16.9
    • New in Version 16.8
    • New in Version 16.7
    • New in Version 16.6
    • New in Version 16.5
    • New in Version 16.4
    • New in Version 16.3
    • New in Version 16.2
    • New in Version 16.1
    • New in Version 16.0
    • New in Version 15.9
    • New in Version 15.8
    • New in Version 15.7
    • New in Version 15.6
    • New in Version 15.5
    • New in Version 15.4
    • New in Version 15.3
    • New in Version 15.2
    • New in Version 15.1
    • New in Version 15.0
    • New in Version 14.9
    • New in Version 14.8
    • New in Version 14.7
    • New in Version 14.6
    • New in Version 14
    • New in Version 13
    • New in Version 12
    • New in Version 11
    • New in Version 10
    • New in Version 9
    • New in Version 8
    • New in Version 7
    • New in Version 6
    • New in Version 5
    • New in Version 4
    • Basic Features
  • EmEditor Free
  • Compare Desktop Installer (MSI), Desktop Portable, and Old Store App (UWP) Versions

Download and try the “world's fastest text editor” now. (Source: ZDNet)

Download Download Free Download

Copyright © 1995-2026 by Emurasoft, Inc.
Download | Buy | Features | Blog | Support | About | Privacy Policy
日本語 | Deutsch | 한국어 |简体中文 | 繁體中文

Scroll to top Scroll to top Scroll to top