It briefly explains how to enable the function to automatically generate html tags in erb.
When I first started programming I had the experience of saying, "Even though the tag was automatically generated in html, it will not be like before when developing with erb." So I tried to summarize the solution. ..
I think that it is included if it is developed with rails, but it is a confirmation.
Press commnad + shift + p and search for setting.json
to open setting.json.
It's a file like this.
setting.json
{
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"files.autoSave": "onFocusChange",
"explorer.confirmDragAndDrop": false,
"window.zoomLevel": 0,
"emmet.triggerExpansionOnTab": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
"[jsonc]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
}
Add the following description.
settings.json
"emmet.includeLanguages": {
"erb": "html",
}
With rails, as learning progresses, some people may adopt haml notation and not use erb. If you want to be able to use not only ruby but also other languages, I thought that it would be an option to write in erb, so I summarized it.
Recommended Posts