Move event handling to vim reading loops