Zen-Coding Support
Hello,
Is there anyway to support this feature as described here: http://mondaybynoon.com/2009/08/17/the-art-of-zen-coding-bringing-snippets-to-a-new-level/
In essence, they speed of code development by using css selector for snippets
"...take things a step further, and turn a complex html structure into
something as simple as a CSS selector? Well, thanks to a new project,
called Zen-Coding, we can do this very thing!"
This means that I could type:
div#sales>div+div.sales_header+div.sales_body+div.sales_footer
which (via some keyboard short-cut) would get converted to:
<div id="sales">
<div tag">sales_header"></div>
<div tag">sales_body"></div>
<div tag">sales_footer"></div>
</div>
H
Please sign in to leave a comment.
I recall reading something about Ruby extensions in RubyMine. I AFAIK, this feature allows you to define ruby scripts that can then be called from RubyMine.I would guess a ruby script with a bit of RegEx might do it?
Some more info here: http://www.jetbrains.net/devnet/docs/DOC-1161
HTH
zen-coding is nice, but I keep hoping someone will write a haml emitter..
Yes, you are right, it can be implemented using RubyMine extension on Ruby. E.g. you may fetch current selected text from an editor and invoke python script similar to "Expand Abbreviation.tmCommand" (see [zen-coding sources]/zen-coding-read-only/plugins/TextMate/Zen Coding.tmbundle/Commands folder).
I've just implement such extension. Today I'll play with it and most likely tomorrow I'll publish an initial version.
This is great! Looking forward to the post.
H
See http://github.com/iromeo/zen-coding-rm-plugin. I've tested it on MacOS. Also should work on other platforms.
Thanks mate. Will have a swing at this tomorrow.
H
Roman! Works like a charm. How do I buy you a beer
Thanks.
H
I am getting the error "Template 'div.class' isn't correct!".
I am on Build #RM-93.202
Any help would be appreciated! This is the one thing I miss from Textmate and WebStorm.
Hello Michael,
Next RubyMine version (2.5) will include the same Zen-Coding Support as in our WebStorm IDE. RubyMine 2.5 EAP (Early Access Program) will start soon.
I don't plan to support my simple RubyMine's Zen-Coding ruby extension because built-in Zen Coding support has been already done in RubyMine 2.5 trunk.
Hhow do I sign-up for your EAP?
Any registration isn't required. We will announce it in our blog - http://blogs.jetbrains.com/ruby/