Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add custom snippets to zen-coding?

I'm trying to get how to add custom snippets to Zen Coding (ZC) plugin for Notepad++. I found the file where ZC stores its snippets

C:\Program Files\Notepad++\plugins\NppScripting\includes\Zen Coding.js

But I have some questions:

  1. What the difference between “snippets” and “abbreviations” ?
  2. ZC expands typed abbreviations differently in different contexts. For example Z followed by Ctrl+E sometimes expands as z-index:|; and sometimes as <z></z>. How does ZC recognize the context?
like image 264
HongKilDong Avatar asked Mar 16 '11 16:03

HongKilDong


1 Answers

Actually, Zen Coding is now renamed as Emmet, which is also available to Notepad++ and it have some docs on customization.

It seems that you need to read on it's snippets.json format.

I can't see the difference between the snippets and abbreviations there, so it would be best to try both ways.

Zen Coding (and Emmet) recognize context based on the editors, for example in ST2 it is based on the current Syntax and Scope, I think there should be something similar to Notepad++

like image 83
kizu Avatar answered Sep 19 '22 23:09

kizu