Autocomplete list ul>li*n in Sublime Text 3

Asked

Viewed 1,173 times

0

Seeing various tutorials on the internet where they use Sublime Text 3 to edit HTML codes, type ul>li{item}*4 and then Ctrl+Space Sublime completes the code with:

<ul>
  <li>item</li>
  <li>item</li>
  <li>item</li>
  <li>item</li>
</ul>

I tried to use some plugins and even then the shortcut does not work.

I installed the plugins that are in this question: How to put autocomplete in Sublime Text 3?

Use the Sublime Text 3 Build 3126 on Windows 10.

  • 1

    This is a shortcut generated by Emmet, but by default it is only available in HTML files. You saved the file before trying to insert the shortcut (or changed the syntax with Ctrl+Shift+P + HTML)?

  • @Andersoncarloswoss, I saved yes and checked that the syntax selected is in the status bar is HTML.

  • 1

    Restarted editor after installation? Tried pressing Tab after typing the shortcut?

  • @Andersoncarloswoss, yes, I restarted, I did it on another computer with Windows 7 also and it doesn’t work.

  • Try to reinstall the package then. I use this same version and here it works normally. Also confirm that it is installed in Ctrl+Shift+P + List Packages.

  • @Andersoncarloswoss, I missed the plugin Ctrl+Shift+P and then Remove Package selected Emmet, rebooted, installed again, waited to download Pyv8, re-entered and nothing... I’m doing something wrong? ul>li{teste}*5 afterward Ctrl+Espaço that’s right?

  • 1

    Here I use the Tab in place of Ctrl+Space

Show 2 more comments

1 answer

5


This type of shortcut is defined in the package Emmet.

inserir a descrição da imagem aqui

To use, simply enter the desired structure and press Tab. It is important to note that the shortcut will only work by default on HTML files, so you need to make sure that the syntax is correct in the lower right corner of the editor.

  • 1

    And if you need to change the syntax of the current document to HTML, just do the following: Mac OS: Cmd + Shift + P --> Syntax Set: HTML Windows / Linux: Ctrl + Shift + P --> Syntax Set: HTML

Browser other questions tagged

You are not signed in. Login or sign up in order to post.