Show More
@@ -62,6 +62,10 b' def register_ipython_shortcuts(registry, shell):' | |||||
62 | filter=(HasFocus(DEFAULT_BUFFER) |
|
62 | filter=(HasFocus(DEFAULT_BUFFER) | |
63 | & EmacsInsertMode()))(newline_with_copy_margin) |
|
63 | & EmacsInsertMode()))(newline_with_copy_margin) | |
64 |
|
64 | |||
|
65 | registry.add_binding(Keys.F2, | |||
|
66 | filter=HasFocus(DEFAULT_BUFFER) | |||
|
67 | )(open_input_in_editor) | |||
|
68 | ||||
65 | if shell.display_completions == 'readlinelike': |
|
69 | if shell.display_completions == 'readlinelike': | |
66 | registry.add_binding(Keys.ControlI, |
|
70 | registry.add_binding(Keys.ControlI, | |
67 | filter=(HasFocus(DEFAULT_BUFFER) |
|
71 | filter=(HasFocus(DEFAULT_BUFFER) | |
@@ -170,7 +174,9 b' def newline_with_copy_margin(event):' | |||||
170 | pos_diff = cursor_start_pos - cursor_end_pos |
|
174 | pos_diff = cursor_start_pos - cursor_end_pos | |
171 | b.cursor_right(count=pos_diff) |
|
175 | b.cursor_right(count=pos_diff) | |
172 |
|
176 | |||
173 |
|
177 | def open_input_in_editor(event): | ||
|
178 | event.cli.current_buffer.tempfile_suffix = ".py" | |||
|
179 | event.cli.current_buffer.open_in_editor(event.cli) | |||
174 |
|
180 | |||
175 |
|
181 | |||
176 | if sys.platform == 'win32': |
|
182 | if sys.platform == 'win32': |
General Comments 0
You need to be logged in to leave comments.
Login now