Add save-hist mode and change keybindings for python mode