How to generate Lorem Ipsum in Visual Studio Code

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
3 min

banner

# Table of Contents

  1. How to generate Lorem Ipsum in Visual Studio Code
  2. Generate Lorem Ipsum text in VS Code using an extension

# How to generate Lorem Ipsum in Visual Studio Code

There are multiple ways to generate lorem ipsum text in VS Code.

For example, you can use the built-in Emmet extension.

Open an HTML file, start typing lorem and click on the option.

generate lorem ipsum

If you need to generate a longer block of text, use lorem*N, e.g. lorem*2.

generate-longer-block

If you need to generate N words of lorem ipsum, use loremN. For example, lorem10 generates 10 words of lorem ipsum.

generate n words of lorem ipsum

If you need to generate multiple lines (paragraphs)j of lorem ipsum text, use p*N>loremN.

For example p*4>lorem5 generates 4 paragraph tags that contain 5 lorem ipsum words each.

generate lorem ipsum on multiple lines

You can also use the loremRows*Words syntax, e.g. lorem3*5 generates 5 rows of lorem ipsum text with 3 words each.

However, we didn't wrap the lines in p tags, so they will wrap into a single line.

lorem generate 5 rows 3 words each

If you need to wrap long lines, press:

  • on macOS: option + z.
  • on Windows or Linux: alt + z.

Alternatively, you can use the Command Palette:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
  1. Type word wrap and select View: Toggle Word Wrap.

wrap long lines

If you encounter issues when using Emmet, check out my other article: Emmet not working in Visual Studio Code issue [Solved].

# Generate Lorem Ipsum text in VS Code using an extension

Alternatively, you can use an extension called Lorem Ipsum.

You can install the extension by:

  1. Clicking on Extensions in the left sidebar.
  • You can also open the Extensions menu by pressing:
    • Ctrl + Shift + X on Windows or Linux
    • Command + Shift + X on macOS
  1. Typing lorem ipsum.

install lorem ipsum extension

  1. Clicking on the Install button.

Make sure to install the lorem ipsum extension that was developed by Daniel Imms as shown in the code sample.

Once you install the extension, you can use it in markdown files, text files or files of any other type.

The extension can be used to:

  • Insert a line of lorem ipsum text.
  • Insert a paragraph of lorem ipsum text.
  • Insert multiple paragraphs of lorem ipsum text.

For example, to insert a line:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type lorem insert and select Lorem Ipsum: Insert a Line.

insert lorem ipsum line

You can use the same process to insert a paragraph.

insert paragraph of lorem ipsum

The same approach can be used to insert multiple paragraphs.

insert multiple lorem ipsum paragraphs

You can select one of the available options or type a specific number of paragraphs.

I've also written an article on how to wrap text with tags in VS Code.

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.