Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emmet coding lorem ipsum, not starting with lorem

Well I just started with emmet scripting/coding. So I found out you can easily generate lorem ipsum

div>lorem20

Only problem I am having I am using lots of lorem ipsum and every thing on the page starts with lorem ipsum. I tried to look if there is a way to say i want lorem ipsum but not starting with lorem ipsum and I can't find any answer to this question.

So the question is, can I easily generate lorem ipsum with emmet but don't let it start with lorem ipsum. (I know that I can remove it but that would be a waste of the syntax using

like image 966
MKroeders Avatar asked Jul 06 '13 11:07

MKroeders


People also ask

How do you make a lorem ipsum in Emmet?

Emmet is great for that. With it installed in the code editor you are using, you can type “lorem” and then tab and it will expand into a paragraph of Lorem Ipsum placeholder text.

How do I activate lorem?

Type =lorem() into a new or existing Word document and hit the enter key.

How do I enable lorem in VS Code?

Create a <p>lorem</p> element within your html document. Select the lorem tooltip popup. It will automatically complete the lorem ipsum text for you.


3 Answers

It might be a new version now. But if I try it (in PHPStorm) with

div>lorem5*10

I get

<div>
    <div>Lorem ipsum dolor sit amet.</div>
    <div>Ea ipsam laboriosam recusandae voluptatibus?</div>
    <div>Animi laborum nam quaerat sequi!</div>
    <div>Obcaecati quos ratione tempora totam.</div>
    <div>Aspernatur porro possimus repellat suscipit?</div>
    <div>Harum incidunt ipsam iste vero?</div>
    <div>Architecto dolorem magni numquam voluptas?</div>
    <div>Porro recusandae totam ut veritatis.</div>
    <div>Dolorum earum laudantium magnam maiores.</div>
    <div>Non obcaecati sit veritatis voluptatibus.</div>
</div>

Every sentence starts with a different text.

like image 196
robsch Avatar answered Oct 06 '22 12:10

robsch


You can create a copy of Lorem Ipsum generator and put it into Extensions folder.

In your copy of generator, update paragraph() function: simply set startWithCommon = false; somewhere at the top of function body.

like image 25
Sergey Chikuyonok Avatar answered Oct 06 '22 10:10

Sergey Chikuyonok


Even though the solution is needed for PHPstorm, I'd like to post a solution for Sublime Text 3. I haven't found anything on the Internet for this problem:

1. Write a js-File into the extensions location defined in your `Emmet.sublime-settings` File.
   (the default path is ~/emmet, which is a folder called "emmet" in your OS-user directory)
2. Copy the following code into the file and save:

.

emmet
    .require('lorem')
    .addLang('en', ['all', 'the', 'words', 'you', 'want', 'to', 'use']);

You could also define another language, but I haven't found out, how to change this setting. Maybe it's the Editor's language. This will simply overwrite the default language.

like image 1
nirazul Avatar answered Oct 06 '22 11:10

nirazul