Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Vim plugin for hclfmt

Subscribe to updates I use vim-hclfmt

Statistics on vim-hclfmt

Number of watchers on Github 48
Number of open issues 0
Average time to close an issue 2 days
Main language VimL
Average time to merge a PR 1 day
Open pull requests 0+
Closed pull requests 0+
Last commit over 2 years ago
Repo Created almost 4 years ago
Repo Last Updated over 1 year ago
Size 6 KB
Organization / Authorfatih
Page Updated
Do you use vim-hclfmt? Leave a review!
View vim-hclfmt activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating vim-hclfmt for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


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 *.hcl, *.tf and *.nomad files on save. Under the hood it uses hclfmt to process the files.



Save the file or call :HclFmt.

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.

  • Pathogen
    • git clone ~/.vim/bundle/vim-hclfmt
  • vim-plug
    • Plug 'fatih/vim-hclfmt'
  • NeoBundle
    • NeoBundle 'fatih/vim-hclfmt'
  • Vundle
    • Plugin 'fatih/vim-hclfmt'

If hclfmt is not already installed:

go get
vim-hclfmt list of languages used
  • Vim script
Other projects in VimL