Edit IPython cell in an external editor

前端 未结 4 1074
灰色年华
灰色年华 2021-02-03 12:45

It would be great to have a keyboard short-cut in IPython notebook, which would allow to edit the content of the current cell in an external editor (e.g. gvim). Maybe just copy

4条回答
  •  星月不相逢
    2021-02-03 13:40

    For people who find this question who are using the IPython terminal application, there is a keyboard shortcut built in which launches $EDITOR with the contents of the current cell. Saving and exiting the editor replaces (but does not yet execute) the contents of the cell with that of the saved file.

    The default keyboard shortcut is the F2 key. This corresponds to the IPython setting IPython.terminal.shortcuts.open_input_in_editor.

提交回复
热议问题