0

So yes, I'm aware that I can type lorem5*3<tab> to get emmet to generate 3 lines of text where the last 2 lines are always random. Unfortunately, the FIRST line is always the same: "Lorem ipsum dolor sit amet." I'm currently trying to replace random manually-written text in a pre-existing HTML file with random "lorem ipsum" generated content instead, but I obviously don't want every instance to begin with "Lorem ipsum". Is there a trick to doing this in VSCode? Perhaps a configuration setting that tells emmet to always begin randomly? I need a way to either suppress the first line or to make it random.

Ideally, I'd be able to do this with VSCode's built-in Emmet, but an extension as a fallback would be fine, too.

4

1 回答 1

2

您的担忧是有效的,幸运的是有一个解决方案,可以在Emmet 官方文档中找到。在preferences.json中,此配置默认设置为false

lorem.omitCommonPart
从生成的文本中省略常用部分(例如“Lorem ipsum dolor sit amet”)。

所以似乎解决方案是将其设置为true,不是吗?简直了,耶!

不是真的,实际上我们在谈论 VSCode。根据他们的文档,尚不支持此功能。因此,由于不支持这种定制,他们建议:

如果您希望支持 Emmet 首选项中记录的任何其他首选项,请记录功能请求

因此,如果您不介意等待,请尝试记录该请求,您的问题迟早会得到解决(或永远不会)

于 2021-10-09T02:44:48.863 回答