diff options
Diffstat (limited to 'ftplugin/terraform.vim')
-rw-r--r-- | ftplugin/terraform.vim | 4 |
1 files changed, 3 insertions, 1 deletions
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 <https://github.com/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 |