0

There are all these great lorem ipsum variations floating around, but no way in hell am I about to go copy and paste them into Sublime Text 2 by hand. I just love Emmet's (lorem100) shortcut too much.

Anyone know how to change the default ipsum to one of these custom ones so Emmet will insert it for me?

4

2 回答 2

1

您可以将自己的 Lorem Ipsum 文本添加到 Emmet:您应该将自己的虚拟词注册为新语言。

要向 Lorem Ipsum 添加新语言,请在extensions 文件夹中创建一个 JS 文件,其中包含以下内容:

emmet.require('lorem').addLang('my', 'collaboratively administrate empowered markets via plug-and-play networks')

第一个参数是语言名称(它必须是一个双字母单词),第二个参数是空格分隔的单词,用于生成虚拟文本。

按如下方式使用此生成器:loremmy100

您还可以将您的虚拟文本语言设置为默认语言:只需覆盖lorem.defaultLang中的设置preferences.json,例如将其设置为"lorem.defaultLang": "my"您可以简单地编写lorem100

于 2013-10-10T20:28:01.363 回答
0

您可以编写自己的代码段。

<snippet>
    <content><![CDATA[
Fromage cheesy feet pecorino. Cheese and biscuits cut the cheese when the cheese comes out everybody's happy melted cheese jarlsberg cheesy feet dolcelatte goat. Cut the cheese cheesecake fondue halloumi dolcelatte cheese and wine macaroni cheese emmental. Halloumi port-salut hard cheese taleggio cheese strings.

Caerphilly who moved my cheese roquefort. Boursin brie chalk and cheese cheese triangles when the cheese comes out everybody's happy cottage cheese stinking bishop goat. Cheese on toast swiss taleggio feta goat queso bavarian bergkase edam. Cottage cheese smelly cheese cheesy grin cut the cheese fondue everyone loves.
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>lorem200</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>text.html</scope>
</snippet>

现在,如果您写入lorem200HTML 文件并按Tab,您将获得定义的 lorem ipsum。

于 2013-10-10T16:56:02.553 回答