English 中文(简体)
最高文本 2 中的 Zen 编码 + 以缩写缩写包装
原标题:Zen Coding + wrap with abbreviation in Sublime Text 2

我想用下列Zen编码缩略语来打包一些清单项目,在最高文本2:

nav>ul.example>li*4

这是列表的一个例子 :

Dog
Cat
Horse
Cow

我该怎么做?

问题回答

当您想要用缩略语元素来折行选择每一行时, 您需要将元素标记为 < em> repeating , 使用 < code_ / code > 运算符 。

因此,你的缩写应该这样写:

nav> ul.example> li_ /code>

(如无乘数值,仅 )

虽然它脱离了上下文, 可能是 < a href=> http://code- pal.com/listify\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

这需要两步,至少这是我找到的最简单的方法:

  1. 选择您的列表, 如果列表中出现空格, 您将会想要对 Windows 使用 (Ctr), 对 Mac 使用 (Cmd), 并选择您想要的周围标签的列表的每一行 。

  2. Hit (Crt/Cmd) + (Shift) + (L), 然后( home) 在标签的文字前面, (End) 在结束标签的文字结尾处。

这将同时编辑所有列表项目, 以便快速和高效的编辑。 这是 Sublime Text 2 的主要优待之一 :

如果这说不通的话告诉我 这样我最好解释一下

on linux: ctrl shift g (to expose zencoding/emmet comand line) then type your elements without increment number at the end, just the *, as Sergey pointed out!

您不必如此复杂。 您可以选择您想要的项目列表( 与鼠标一起过它) 。 请确定您在 html 模式中, 而不是文本模式中 。 然后您只需在 Koan 编码 ( CTRL 选项返回 - 在您的系统中可能不同) 下将 div> nav. elemental>li* 输入到底线 库安 编码 ( CTRL 选项返回 - 在您的系统中可能不同), 所有列表项目都在代码中 。

如果您有网站列表, 您只需要输入 a * 就可以用超链接把它们包起来。 非常有用 。





相关问题
Parent selector for zen-coding

I just discovered zen-coding. I have the following snippet of code I want to generate. <div id="base"> <div id="header"> <div id="logo"></div> &...

Reverse Zen Coding

I m writing a JavaScript unit test suite and one of the features I d like to add is the ability to assert that a certain element and its children match a given HTML structure. My first idea is to use ...

How change short keys in Vim?

I am a new user in Vim. How change these keys in Zen Coding, ctr+y+, To ctr+e And also change in omni, ctr+x ctr+o To ctr+j How can I do that?

Parse HTML file to grab all ID and Classes for a CSS file

A short while ago, I m fairly certain I came across an application (or perhaps a plugin for Coda - the IDE I use) which quickly parses a html document and then spits out all of the elements with IDs ...

Windows compatible IDE for webdevelopment?

I have been searching for the perfect web development IDE for some time now. I first started coding with notepad when all I wrote was HTML. Clearly, that was a relationship not meant to last. ...

Zen Coding, how to achieve alternating item multiplication

I recently attempted adding Zen Coding to my tool box of software development box of magic and have been mostly underwhelmed by it. Whether or not this is because it truly is technically deficient or ...

Emacs, Zen-Coding mode, and Putty

I use emacs via Putty and since Putty doesn t send certain key combinations to the remote console I generally need to re-bind them to other key combinations. After installing the amazing Zen-Coding ...

Zen Coding + jQuery

I just read this article at Smashing Magazine (http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/) about Zen Coding. Is there any jQuery plugin for this? It might be ...