More flexible customizable templating
So a new zen coding like experience has been created called hayaku
http://hayakubundle.com/
It could sort of work with regex based live templates as noted here:
http://youtrack.jetbrains.com/issue/IDEA-29982
oh
o:h
ovhi
overfl:hidn
all create
overflow: hidden
and these are other examples
h10 -> height: 10px
ml-1.5 -> margin-left: 1.5em (switches to em by default since there can't be a point decimal value)
w50p -> width: 50%
cF -> color: #fff
bg80 -> background: #808080
But really it's about bringing in customizability into the IDE without having to build a java plugin. IntellijEval looks good but it isn't as deeply integrated as this though maybe it can be. Perhaps as a workaround, is there a way to trigger text processing for text to the left of the cursor without selecting the text and have that processing done via an external script? It isn't just that hayaku is nice, and that its fast, but that it can be triggered the way Zen is with a tab. It doesn't break the flow and the source of it is easily modifiable without going through a compile/build cycle.
Just airing some thoughts here.
Message was edited by: Michael Wills
Clarifications to workar
请先登录再写评论。
Maybe intellijeval is integrated tightly enough, though it is an IntelliJ-only solution.
A gist to do grep within the plugin:
https://gist.github.com/3879764
If I get some time I'd like to try moving the Google search demo over to intellijeval
http://www.jetbrains.com/idea/training/demos/google_search.html
and get a feel for the API and such.
Hi Michael,
Just noticed your question.
I looked at how live templates are implemented and it seems that they are not designed for Hayaku-like behaviour.
It's possible to do it in intellijeval e.g. like this https://gist.github.com/dkandalov/5222759 (this is simplistic example)
And it can be enabled for all other IDEs as well.
(Just to clarify there is no integration between intellijeval and IntelliJ.. it just runs groovy code, so you can do anything with limitation that some components can only be initialized/configured during IDE startup)
Hi Michael,
Since WebStorm/PhpStorm 6.0 and IDEA 12.1 is Emmet support implemented (http://emmet.io). And following examples already work fine there.
That examples also implemented according to http://docs.emmet.io/css-abbreviations/fuzzy-search/, but will be available in the next version of IDEs.
Also, feel free to vote for hayaku support: http://youtrack.jetbrains.com/issue/WEB-4679
Thanks much. I voted for hayaku support but I have to say the emmet support has been quite nice.