While editing an erb file using VScode, the comment out shortcut
Press cmd+/ to get //
and cannot comment out.
Is this because the erb file is identified with the html file?
The settings.json file looks like this:
{
"editor.tabSize": 2,
"editor.renderWhitespace": true,
"files.associations": {
"*.erb": "erb"
},
"emmet.includeLanguages": {
"erb": "html"
},
"workbench.iconTheme": "vscode-icons",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"html.format.endWithNewline"—true,
"solargraph.autoformat": true,
"files.insertFinalNewline": true,
"workbench.editor.closeEmptyGroups": false,
"files.trimFinalNewlines": true,
"workbench.editor.enablePreview": false
}
If you install and enable the "Ruby" extension (publisher name is Peng Lv), it might be the desired behavior.
("Ctrl+Shift+X" opens the Extensions tab, where you can find Ruby.)
If you enable this extension with the settings.json
mentioned above reflected, you can use the
The html.erb file was recognized as an erb file (the language mode displayed in the lower right corner is now "erb").
"When I did ""cmd+/"" in that state, they commented out as follows."
<%#text%>
914 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
581 PHP ssh2_scp_send fails to send files as intended
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.