Closed wolph closed 8 years ago
Hi there. It's a particular way the signs are handled in Vim. When you delete lines, signs are not updated until you save the buffer, effectively running :PyFlake command. As for the cases when signs are not updated even after saving, please try to reproduce one and post it here.
Ah, that's too bad. Would you happen to know if there's any autocmd to bind to or would I have to remap dd
to make it work? There should be some way to make it a bit smarter, especially with unused imports it's pretty much unusable at the moment. After you delete a line the next error is on the wrong line.
As for the signs not being updated after saving, I've had it a few times but it's not consistently repeatable so it might be related to one of my other bundles.
Oh, I just hit :w now and then. Another way would be to run checks on idle or on some kind of periodic timer, but it will make the whole affair sluggish.
Hitting :w
is what I do now but it's just a tad annoying... I'm going to keep on looking for a better solution. Thanks for the quick response though, greatly appreciated :)
Well, I found a solution:
autocmd TextChanged *.py silent PyFlake
Good, but not very usable in general, because it will be called very often and on big files may slow down editing.
As you can see, after deleting the two lines that are marked as errors, the
import os
line is now marked as an error which is incorrect. Only after saving the file again it is marked as correct again. But in some cases that doesn't happen either.Any idea what could be wrong with my config? Or is it a bug?