有没有办法使用Emmet突出显示并包装以下行:
This is a title
This is a subtitle
This is the sentence below the subtitle.
所以它会输出:
<h2>This is a title</h2>
<h3>This is a subtitle</h3>
<p>This is the sentence below the subtitle.</p>
我试过了:
h2+h3+p
但是那个输出:
<h2></h2>
<h3></h3>
<p>This is a titleThis is a subtitleThis is the sentence below the subtitle.</p>
试试这个:
h2{This is a title}+h3{This is a subtitle}+p{This is the sentence below the subtitle.}
JS Fiddle :(只需在行尾按Tab键:)
不,这是不可能的。在这种情况下,单独包装每一行的速度要快得多,而不是单一缩写的新语法。