Feature or enhancement
Although multiline editing has been significantly improved in the new REPL, for users who are comfortable with Vim or other editors, writing long or complex code blocks in it can still be a little bit inconvenient. Editing the current input in an external editor can unlock the power of users' editor.
This is a common feature in many other shells:
Proposed behavior:
- Default shortcut: C-x C-e
- Create a temporary file with
.py suffix and write reader.buffer to it
- Open it in a subprocess with $VISUAL or $EDITOR. Fall back to vi (Unix-like) or notepad (Windows) if neither variable is set
- After saving and exiting, load the content to
reader.buffer and delete the temporary file.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
https://discuss.python.org/t/add-edit-in-external-editor-to-pyrepl-ctrl-x-ctrl-e/107170
Linked PRs
Feature or enhancement
Although multiline editing has been significantly improved in the new REPL, for users who are comfortable with Vim or other editors, writing long or complex code blocks in it can still be a little bit inconvenient. Editing the current input in an external editor can unlock the power of users' editor.
This is a common feature in many other shells:
C-x C-e)Proposed behavior:
.pysuffix and writereader.bufferto itreader.bufferand delete the temporary file.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
https://discuss.python.org/t/add-edit-in-external-editor-to-pyrepl-ctrl-x-ctrl-e/107170
Linked PRs