Show More
@@ -26,6 +26,8 b' def register_ipython_shortcuts(registry, shell):' | |||||
26 | & insert_mode |
|
26 | & insert_mode | |
27 | ))(newline_or_execute_outer(shell)) |
|
27 | ))(newline_or_execute_outer(shell)) | |
28 |
|
28 | |||
|
29 | registry.add_binding(Keys.ControlBackslash)(force_exit) | |||
|
30 | ||||
29 | registry.add_binding(Keys.ControlP, |
|
31 | registry.add_binding(Keys.ControlP, | |
30 | filter=(ViInsertMode() & HasFocus(DEFAULT_BUFFER) |
|
32 | filter=(ViInsertMode() & HasFocus(DEFAULT_BUFFER) | |
31 | ))(previous_history_or_previous_completion) |
|
33 | ))(previous_history_or_previous_completion) | |
@@ -145,6 +147,12 b' def reset_search_buffer(event):' | |||||
145 | def suspend_to_bg(event): |
|
147 | def suspend_to_bg(event): | |
146 | event.cli.suspend_to_background() |
|
148 | event.cli.suspend_to_background() | |
147 |
|
149 | |||
|
150 | def force_exit(event): | |||
|
151 | """ | |||
|
152 | Force exit (with a non-zero return value) | |||
|
153 | """ | |||
|
154 | sys.exit("Quit") | |||
|
155 | ||||
148 | def indent_buffer(event): |
|
156 | def indent_buffer(event): | |
149 | event.current_buffer.insert_text(' ' * 4) |
|
157 | event.current_buffer.insert_text(' ' * 4) | |
150 |
|
158 |
General Comments 0
You need to be logged in to leave comments.
Login now