pulling out parts coupled to readline-vim and exposing onreset