VSCODE - How to auto closing html code of ruby on rails html.erb file

You don't need to install any extension, just add this to you User settings.json file in VSCode at the end of the file, and it will work like a charm.

"emmet.showSuggestionsAsSnippets": true,
"emmet.includeLanguages": {"html.erb": "html", "erb": "html"}

More info about emmet suggestion ordering


  1. Install the Ruby extension.
  2. Add this to your user settings:

    "emmet.includeLanguages": {"erb": "html"}
    

Example with erb and ruby:

VSCode User Settings