ERB Formatter/BeautifyOverviewThe ERB Formatter/Beautify extension for Visual Studio Code uses the htmlbeautifier gem to format ERB files, providing a seamless experience with the VS Code Formatter API. Unlike other solutions that require setting up tasks or manual formatting, this extension integrates directly with VS Code to format your ERB files automatically. Features
InstallationRequirementsTo use this extension, you must have Install Globally
Install with BundlerAdd the following to your
Then run:
ConfigurationResolving File Recognition IssuesIf
Setting Default Formatter and Enabling Format-on-SaveTo set the default formatter for ERB files and enable format-on-save, add the following to your
This ensures that the extension formats ERB files automatically whenever they are saved. Disabling Formatting for Specific FilesTo disable formatting for specific ERB files, such as email templates, use the
This configuration ignores all Fixing Encoding IssuesIf you encounter the
For more details, see the related issue. SettingsBelow is a list of settings you can configure in your
ReferencesCredits
|
