エンジニアとしての市場価値を測りませんか?PR

企業からあなたに合ったオリジナルのスカウトを受け取って、市場価値を測りましょう

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCode の ERB フォーマッタ設定

Last updated at Posted at 2025-01-04

VSCode 拡張機能インストール

VSCode の拡張機能 ERB Formatter/Beautify を使います。

Gem インストール

gem で htmlbeautifier をインストールします。

gem install htmlbeautifier

VSCode settings.json 設定

プロジェクトの .vscode/settings.json に以下の設定を追加します。

{
    "[erb]": {
        "editor.defaultFormatter": "aliariff.vscode-erb-beautify",
        "editor.formatOnSave": true
    },
    "files.associations": {
        "*.html.erb": "erb"
    },
    "emmet.includeLanguages": {
        "erb": "html"
    }
}

以上です。

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?