Vim, Terminal, psql not being very nice

I’ve been having some weird problems the last couple of days, namely that sometimes if I type something in the terminal and subsequently delete the text, the text itself is deleted programmatically, but visually it hangs around.

I’ve always had this problem in psql, but it’s not that big of a deal because I could just \q and then reconnect. However in vim it’s become quite annoying where the whole window becomes unusable and I’ve just been closing everything and reopening.

So two questions, are these artifact characters indicative of a larger problem, and in vim how would I reload all the buffers without having to quit and then open everything back up again?

Thanks!

I never have this problem in Vim, but I do have it very often in iTerm using zsh if I use vim-mode to delete a line or if I use the up key to recall prior commands. Curious if anyone has a solution, because it’s annoying!

Does ctrl-l help? That should force vim to redraw the screen. You might also check out suspending a process via ctrl-z and resuming via fg, that usually fixes drawing problems.

As to why it’s happening, no idea. It’d be highly dependent on your terminal of choice, OS, and config.

Of course, since I posted this I haven’t had the problem at all. But once it creeps back I’ll give this a shot.

Thanks for your help today!