1

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.

Word Demon
  • 73
  • 2
  • 8
  • The point of using lipsum is that you don't care what the text is saying. If you do care, then you should be using something else – Hong Ooi Oct 08 '21 at 23:20
  • emmet is written in JS and you can modify the Lorem generator, be aware if you update VSC – rioV8 Oct 08 '21 at 23:41
  • @rioV8 Yeah, someone already mentioned that option [here](https://stackoverflow.com/a/17511090/10818186). I'd really rather not do that, though. I'd probably have to constantly update it as new versions of VSCode come out and overwrite my changes. – Word Demon Oct 08 '21 at 23:47

1 Answers1

4

Your concern is valid and luckily there's a solution, that can be found in the official Emmet documentation. In preferences.json, this configuration is by default set to false:

lorem.omitCommonPart
Omit commonly used part (e.g. “Lorem ipsum dolor sit amet“) from generated text.

So it seems the solution is to set it to true, isn't it? Simply, yay!

Not really, actually we're talking about VSCode. There's no support to this functionality yet according to their docs. Thus, since this customization is not supported, they advise:

If you want support for any of the other preferences as documented in Emmet Preferences, please log a feature request

So if you don't mind waiting try logging that request and your problem may be addressed sooner or later (or never)

testing_22
  • 2,340
  • 1
  • 12
  • 28