zencoding(HTML) for EditPlus v1.0
2009年12月15日 | HTML/CSS
新版本v1.1请见:http://www.vfresh.org/w3c/914
今早看到前端观察翻译的《Zen Coding: 一种快速编写HTML/CSS代码的方法》
对这种编辑方式很感兴趣,但自己熟知的EditPlus并未有此插件
遂研究了下,做出了简单功能
目前只能通过选取片段来生成html
找不到EditPlus的接口信息….似乎没有接口.
设置方式:

设置参数文本:
命令:WScript.exe "D:\editPlus\app\zencoding\zencoding.wsf"
(红色下划线部分为插件放置路径)
参数:$(CurLine)||$(CurSel)
初始目录:$(FileDir)
勾选运行为文本过滤器:替换

19 条留言
vicZen好快,我今天看到前端观察文章也想做成EditPlus的插件,后来看评论,你已经做好了。。。呵呵
[回复]
压缩包内的epp.js是什么编码?
里面有好多乱码.
zencoding.wsf文件的编码是UTF-8不带BOM头的,按理说那个应该也是UTF-8的,
但以UTF-8读是乱的,以ANSI读还是乱的..
[回复]
epp.js的乱码都是注释,不受影响。我记得好像是Europe编码
wsf是utf8的.
[回复]
请问写代码的时候怎么用呢
[回复]
选中代码,然后点击 工具->zen code(你设置的zen code名称)
或者你可以设置一个快捷键。
[回复]
提示警告框 无法获取进程 是怎么回事
[回复]
无法创建进程
[回复]
WScript.exe “D:\editPlus\app\zencoding\zencoding.wsf”
注意 WScript.exe 与路径之间要一个空格
[回复]
初步估计是 wscript.exe 这个文件的问题。
首先确认你是按我说的设置。
你检查下C:\WINDOWS\system32下是否有wscript.exe这个文件。
或者你把wscript.exe改成绝对路径试试
[回复]
ok了,在dw跟edit都装上了,谢啦
[回复]
下一个… 有空研究下代码… 谢了。
[回复]
不错不错,谢谢了!
[回复]
哈哈,那个是 zen coding 不是 zend coding~
[回复]
Well, I have tried lots of things now but I can’t get it to work.
I tried remove spaces from $(CurLine)||$(CurSel)
I changed encoding for both files to utf8 and ansi
I have the latest version of EditPlus (3.12)
I tried changing WScriptexe to.wscript.exe. I also changed it to full path.
I moved the zencoding dir to c:\zencoding
I tried only one argument $(CurLine)
Maby I execute it wrong? I type li or div and go to Tools -> zencoding (ctrl+1)
How do you debug epp.js and zencoding.wsf?
This would be just amazing to get it work.
[回复]
you have to select text before go to Tools -> zencoding(ctrl+1)
[回复]
此工具已经应用上,很强大
但有点小问题,每次输入完代码后,需要用 Shift+Home选中当前行,然后再按 执行工具 的快捷键
要按两次快捷键才能生效,效率还是不高
EDITPLUS自带的“记录击键” 功能很弱,无法把两个快捷键组合到一起
如果能解决这个问题,输入完代码后 按一次快捷键就执行 的话就完美了
期待完美解决方法
[回复]
我也很期待-。-
[回复]
Wee. It works. Your’re genius!
What I undrestand from google translate and my own need, there’s no neat way of executing the shortcut. Well I did a pretty nice thing for time being.
In action I type the shortcut like li>li and press shift+enter. It selects the html and executes ctrl+1
For this to work, I use AutoHotkey (google it). Just install it and insert this code after install to default script:
; editplus zencoding shortcut
+Enter::
Send +{Home}
Send ^+{Right}
Send ^{1}
return
Send +{Home} is shift plus home and selects the whole line
Send ^+{Right} is ctrl + shift + right key and goes to beginninf of first character
^{1} is ctrl+1
[回复]
太棒了,试了几次成功了~~
[回复]