如何通过禅宗编码增加价值?
我喜欢在输入禅宗编码时增加价值。例如,输入:文本变为:。如何使 input:text 变为并将键盘光标放在 value 属性的 '' 之间?
I like to add value when I type zen coding. For example, input:text becomes :. How do I make it so that input:text becomes and place keyboard cursor between '' of value property?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
@Moon
这是我使用的一个技巧。
然后,在文本编辑器中选择整个
干杯:-)
@Moon
Here is a trick that I use.
then, you select the whole
<select>
block in your text editor.Then, replace all
"<option id"
with"<option value"
.Cheers :-)
如果您通过定义应该包装什么值(在开始标记和结束标记之间)来调整该值,则使用以下模式,
结果为
虽然我不知道编辑器和 IDE 是否支持此功能,但我只能说它有效适用于 IntelliJ 和 Notepad++。
If you ment the value by defining what value should be wrapped (between open and closing tags), then use following pattern
which results to
Allthough I'm not aware of the editors and IDE's supporting this feature, but all I can say is it works for IntelliJ and Notepad++.
添加此
table>tr*5>td*5>lorem10
将生成:
Adding this
table>tr*5>td*5>lorem10
Will generate:
据我所知,你不能——至少在默认的 Zen Coding 标准中不能。不过,至少有一个项目试图向 Zen Coding 添加值和一些基本逻辑(如循环),请参阅 https://github.com/zodoz/jquery-ZenCoding。请注意,这是一个 Javascript 实现。
As far as I know, you can't - at least not in the default Zen Coding standard. There is at least one project that tries to add values and some rudimentary logic (like looping) to Zen Coding though, see https://github.com/zodoz/jquery-ZenCoding. This is a Javascript implementation, mind.
您可以使用方括号向标签添加属性,因此编写
input:text[value]
将创建— 具有三个占位符位置的输入,其中两个通用,带有
:text
和来自value
属性代码>[值]。You can add attributes to tags using the square brackets, so writing
input:text[value]
would create<input type="text" name="|" id="|" value="|">
— the input with three places for placeholders, two generic, that come with:text
and thevalue
attribute which comes from[value]
.我曾经使用过的东西..
将生成
所以,
$
将扩展到相应的数字...无论你把它放在哪里!我在 Sublime Text 2 中使用 Emmet 插件。
Something I used once ..
will generate
So,
$
would expand to corresponding number...wherever you put it!I was using Emmet plugin with Sublime Text 2.