你可以在Sublime Text 2中使用Emmet在生成的兄弟姐妹中保留数值吗?

时间:2014-06-13 09:32:14

标签: sublimetext2 emmet

我有以下emmet系列:

.lightbox-5-row*8>a[href="#"][rel="lightbox[a]"]*5>img[src="file_$$.jpg"]

其中8次产生以下结构:

<div class="lightbox-5-row">
    <a href="#" rel="lightbox[a]"><img src="file_01.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_02.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_03.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_04.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_05.jpg" alt=""></a>
</div>

我想要做的是能够增加兄弟.lightbox-5-row元素中文件的数量,如下所示:

<div class="lightbox-5-row">
    <a href="#" rel="lightbox[a]"><img src="file_01.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_02.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_03.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_04.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_05.jpg" alt=""></a>
</div>
<div class="lightbox-5-row">
    <a href="#" rel="lightbox[a]"><img src="file_06.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_07.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_08.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_09.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_10.jpg" alt=""></a>
</div>
<div class="lightbox-5-row">
    <a href="#" rel="lightbox[a]"><img src="file_11.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_12.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_13.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_14.jpg" alt=""></a>
    <a href="#" rel="lightbox[a]"><img src="file_15.jpg" alt=""></a>
</div>

等等......有没有办法实现这个目标?

1 个答案:

答案 0 :(得分:3)

不,使用当前的Emmet语法

是不可能的