##// END OF EJS Templates
Add 'v' binding in vi-navigation-mode to %edit.
Antony Lee -
Show More
@@ -4,7 +4,7 b' import sys'
4 from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
4 from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
5 from prompt_toolkit.filters import (HasFocus, HasSelection, Condition,
5 from prompt_toolkit.filters import (HasFocus, HasSelection, Condition,
6 ViInsertMode, EmacsInsertMode, HasCompletions)
6 ViInsertMode, EmacsInsertMode, HasCompletions)
7 from prompt_toolkit.filters.cli import ViMode
7 from prompt_toolkit.filters.cli import ViMode, ViNavigationMode
8 from prompt_toolkit.keys import Keys
8 from prompt_toolkit.keys import Keys
9 from prompt_toolkit.key_binding.bindings.completion import display_completions_like_readline
9 from prompt_toolkit.key_binding.bindings.completion import display_completions_like_readline
10
10
@@ -66,6 +66,10 b' def register_ipython_shortcuts(registry, shell):'
66 filter=HasFocus(DEFAULT_BUFFER)
66 filter=HasFocus(DEFAULT_BUFFER)
67 )(open_input_in_editor)
67 )(open_input_in_editor)
68
68
69 registry.add_binding('v',
70 filter=HasFocus(DEFAULT_BUFFER) & ViNavigationMode()
71 )(open_input_in_editor)
72
69 if shell.display_completions == 'readlinelike':
73 if shell.display_completions == 'readlinelike':
70 registry.add_binding(Keys.ControlI,
74 registry.add_binding(Keys.ControlI,
71 filter=(HasFocus(DEFAULT_BUFFER)
75 filter=(HasFocus(DEFAULT_BUFFER)
General Comments 0
You need to be logged in to leave comments. Login now