diff --git a/IPython/terminal/prompts.py b/IPython/terminal/prompts.py index ee2c5d7..3f5c07b 100644 --- a/IPython/terminal/prompts.py +++ b/IPython/terminal/prompts.py @@ -17,7 +17,12 @@ class Prompts(object): def vi_mode(self): if (getattr(self.shell.pt_app, 'editing_mode', None) == EditingMode.VI and self.shell.prompt_includes_vi_mode): - return '['+str(self.shell.pt_app.app.vi_state.input_mode)[3:6]+'] ' + mode = str(self.shell.pt_app.app.vi_state.input_mode) + if mode.startswith('InputMode.'): + mode = mode[10:13].lower() + elif mode.startswith('vi-'): + mode = mode[3:6] + return '['+mode+'] ' return ''