160

GitHub - hashivim/vim-terraform: basic vim/terraform integration

 6 years ago
source link: https://github.com/hashivim/vim-terraform
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Call For Maintainers

This plugin, along with others like it, is now maintained by the HashiVim organization, which is looking for additional maintainers and contributors. See the HashiVim home page for further information.


Overview: vim-terraform

This plugin adds a :Terraform command that runs terraform, with tab completion of subcommands. It also sets up *.hcl, *.tf, *.tfvars, .terraformrc and terraform.rc files to be highlighted as HCL and *.tfstate as JSON.


Installation

With Vim 8 packages:

git clone https://github.com/hashivim/vim-terraform.git ~/.vim/pack/plugins/start/vim-terraform

With Pathogen:

git clone https://github.com/hashivim/vim-terraform.git ~/.vim/bundle/vim-terraform

With Vundle, add the following to ~/.vimrc:

Plugin 'hashivim/vim-terraform'

Usage

Settings are documented in the help.


Updating vim-terraform

Note, this is only for maintainers of the vim-terraform project.

When a new version of Terraform drops, you can run the following where x.x.x is a version such as 0.11.11

./update_automagic.sh x.x.x

At this point, add the modified files to a git branch and open a pull request.

git checkout -b "feature/update-to-terraform-$VERSION"
git add $FILE
git commit -m "Message about update"
git push

Add another maintainer to the pull request and await confirmation.


Running tests

To run the test suite and verify functionality

make

Credits

Syntax highlighting and indentation by Kevin Le (@bkad) based on prior work by Larry Gilbert (@L2G). The rest originally written by Mark Cornick https://www.markcornick.com/ and contributors listed below. Licensed under the ISC license.

Thanks to the following contributors:

  • michael j talarczyk (@mijit)
  • Koji Nakayama (@knakayama)
  • Kris (@kostecky)
  • Okumura Takahiro (@hfm)
  • Paul Forman (@pforman)
  • Lowe Schmidt (@lsc)
  • Mario Kozjak (@mkozjak)

The :TerraformFmt command is adapted from vim-hclfmt.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK