This plugin will automatically run terraform fmt
on any Terraform file before saving.
There's also a command palette entry called Terrafmt: Format this file
to manually format.
Users can override the options in Packages/User/Terrafmt.sublime-settings
.
This file can be opened either through the menus (Preferences > Package Settings > Terrafmt > Settings) or through the command palette (Ctrl+Shift+P) and enter Preferences: Terrafmt settings
.
- Install the Sublime Text Package Control plugin if you haven't already.
- Preferences > Package Control
- Open up the command palette (Ctrl+Shift+P) and enter
Package Control: Install Package
- Search for
Terrafmt
and hit Enter to install.
- Click the
Preferences > Browse Packages
menu. - Open up a terminal and execute the following:
git clone https://github.com/p3lim/sublime-terrafmt Terrafmt
- Restart Sublime Text.