From ed677c34d55a0e025b7008f29419498a3989cde2 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 4 Mar 2019 09:15:44 +0100 Subject: Update --- ftplugin/terraform.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ftplugin/terraform.vim') diff --git a/ftplugin/terraform.vim b/ftplugin/terraform.vim index bbebacbc..c5c30627 100644 --- a/ftplugin/terraform.vim +++ b/ftplugin/terraform.vim @@ -3,6 +3,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == " terraform.vim - basic vim/terraform integration " Maintainer: HashiVim +set formatoptions-=t + if exists("g:loaded_terraform") || v:version < 700 || &cp || !executable('terraform') finish endif @@ -44,7 +46,7 @@ endfunction " https://github.com/fatih/vim-hclfmt/blob/master/autoload/fmt.vim function! terraform#fmt() let l:curw = winsaveview() - let l:tmpfile = tempname() + let l:tmpfile = tempname() . ".tf" call writefile(getline(1, "$"), l:tmpfile) let output = system("terraform fmt -write " . l:tmpfile) if v:shell_error == 0 -- cgit v1.2.3