Archived project. No maintenance.
This project is not maintained anymore and is archived. Feel free to fork and make your own changes if needed. For more detail read my blog post: Taking an indefinite sabbatical from my projects
Thanks to everyone for their valuable feedback and contributions.
Vim plugin to format Hashicorp Configuration Language (HCL) files, this format is used by a number of Hashicorp tools, such as Terraform as the language used for configuration.
The plugin by default will format
*.nomad files on save.
Under the hood it uses hclfmt to process the
Save the file or call
By default vim-hclfmt automatically formats *.hcl, *.tf and *.nomad files. You can permanently set this configuration in your
~/.vimrc as follows:
let g:hcl_fmt_autosave = 0 let g:tf_fmt_autosave = 0 let g:nomad_fmt_autosave = 0
Vim-hclfmt follows the standard runtime path structure. For Pathogen just clone the repo. For other plugin managers add the appropriate lines and execute the plugin's install command.
git clone https://github.com/fatih/vim-hclfmt.git ~/.vim/bundle/vim-hclfmt
If hclfmt is not already installed:
go get github.com/fatih/hclfmt