##// END OF EJS Templates
Add shortcut to edit cell
Carl Smith -
Show More
@@ -62,6 +62,10 b' def register_ipython_shortcuts(registry, shell):'
62 62 filter=(HasFocus(DEFAULT_BUFFER)
63 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 69 if shell.display_completions == 'readlinelike':
66 70 registry.add_binding(Keys.ControlI,
67 71 filter=(HasFocus(DEFAULT_BUFFER)
@@ -170,7 +174,9 b' def newline_with_copy_margin(event):'
170 174 pos_diff = cursor_start_pos - cursor_end_pos
171 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 182 if sys.platform == 'win32':
General Comments 0
You need to be logged in to leave comments. Login now