LoginSignup
1
0

More than 1 year has passed since last update.

VScodeでerbファイルをEmmet有効にする際に気づいたこと

Last updated at Posted at 2022-03-12

VScodeのEmmet補完の設定

erbファイルでもEmmetを有効にするには、VScodeのsettingにある Emmet:include Languages を設定します。ググって調べると以下の画像のように設定で完了したらいいらしい。
Image from Gyazo
ただ私の場合はこれだけでは機能しませんでした。少し時間をかけて調べてみると以下の画像のように設定を加えたら解決しました。
Image from Gyazo
ちなみにsetting.jsonへ直接記述しても設定は変更できます。

{
    "security.workspace.trust.untrustedFiles": "open",
    "window.zoomLevel": 1,
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "editor.tabSize": 2,
    "editor.insertSpaces": false,
    "workbench.colorTheme": "One Candy",
    "emmet.showSuggestionsAsSnippets": true,
    "emmet.triggerExpansionOnTab": true,
    "emmet.includeLanguages": {
        "erb": "html",
        "ruby": "html"
    },
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0