hashivim / vim-terraform

basic vim/terraform integration
http://hashivim.github.io/vim-terraform
ISC License
1.07k stars 111 forks source link

vim does not redraws after the terraform fmt #166

Closed rsiwal closed 3 years ago

rsiwal commented 3 years ago

Steps to reproduce:

  1. vim test.tf
  2. Save the file using :w
  3. The vim terminal does not redraws and does not look good

Expected Result: Vim should redraw and terminal should look clean

rsiwal commented 3 years ago

Here is the diff for the fix .

diff --git a/ftplugin/terraform.vim b/ftplugin/terraform.vim
index a59cfbf..657a9a1 100644
--- a/ftplugin/terraform.vim
+++ b/ftplugin/terraform.vim
@@ -60,6 +60,7 @@ if get(g:, 'terraform_fmt_on_save', 0)
     autocmd!
     autocmd BufWritePre *.tf call terraform#fmt()
     autocmd BufWritePre *.tfvars call terraform#fmt()
+               autocmd BufWritePost *.tf redraw!
   augroup END
 endif
dimbleby commented 3 years ago

Sorry, I don't understand. What do you mean by "does not look good"?

Is this a terraform-specific thing, or do you want to raise an issue at the vim repository?

dimbleby commented 3 years ago

Per #167 closing this down: I don't think that this repository is the right place to fix whatever you're seeing. But do open a new one if I'm wrong.