add a delegate method for vim state change (and use _delegate instead of self.delegate)