Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

open $EDITOR with %edit-like command, returning the contents to the repl #3

Open
manniche opened this issue Jan 31, 2012 · 1 comment

Comments

@manniche
Copy link

For longer ipython-sessions, I regularly use the %edit functionality, which opens an editor (defined in $EDITOR) and upon closing the editor, returns the contents in a string to the interactive shell.

With python, the functionality is really nice when needing to insert custom classes in your ipython session, those indentations are much more easily managed in a sane editor than in the shell. The same is the case for me when trying to keep track of the parentheses.

See http://ipython.org/ipython-doc/rel-0.12/interactive/tips.html#lightweight-version-control for reference.

@cosmin
Copy link
Owner

cosmin commented Jan 31, 2012

I agree fully, and support for %ed is at the top of the list of what I want to implement. The problem currently is that in Java this is much harder to do than in Python due to limitations of the JVM. While I can execute a process for the editor it won't be attached to the TTY. This means you wouldn't be able to open up Vim or Emacs in the terminal. It would work if $EDITOR was set to something that would launch in a separate window (such as TextMate), but that's far less useful for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants