I've installed the vim-flake8
plugin and it works correctly to lint Python
in vim
.
When I am on a particular line, I can use :call flake8#Flake8ShowError()
and it will display the error in the vim ruler at the bottom.
I would like for this to be done automatically when my cursor moves over an offending line. Is this possible with a simple command added to .vimrc
?
:help CursorHold
; you could install a buffer-local autocommand in Python filesautocmd CursorHold *.py call flake8#Flake8ShowError()
in.vimrc
. It seems to work, but not ideal. I have to wait an arbitrary amount of time (a few seconds) and then move my cursor for it to display. I also triedCursorMoved
but thenvim
runs slightly slower. Is there a way for it to run only when my cursor moves over an offending line, and only once?