Closed rsiwal closed 3 years ago
If redraw after formatting is necessary, then I expect this change should go in the function that does the formatting; not on this autocmd.
But I am yet to understand why this is necessary. I format terraform files through vim regularly and have never felt the need to redraw...
My test file without fmt is :
provider "aws" {
region = "us-west-2"
}
After fmt is
region = "us-west-2"
} region = "us-west-2"
Here are the URLs of snapshots PRE: https://snipboard.io/tvGsuz.jpg POST writing the file https://snipboard.io/G1j3lR.jpg
If I redraw the window, it gets fixed.
I cannot reproduce: formatting the file, and formatting on save, both work exactly as expected for me.
I think this plugin has enough users that it's likely that whatever is going on here is something specific to your environment: maybe the vim version, or the terminal, or other plugins, or I don't know what.
If you're up for debugging I'd suggest:
In the long run that should be more valuable than working around the issue one plugin at a time...
Gonna close this one down, do feel free to open a fresh issue or MR if you want to make the case that this really is the right place to fix what you're seeing.
[166] Vim terminal should redraw after terraform file is saved