I have been trying to set my %edit editor to Emacs for a while and made very slow progress.
The IPython 0.13 docs were unclear about how to actually configure this. It told me to set EDITOR to the desired editor (in my case, "emacsclient") by adding
c = get_config()
c.InteractiveShell.editor = 'emacsclient'
to my config in my ipython folder.
However, I couldn't find any such folder. I spent a very long time looking around to find just how to set IPython environment variables and found only related snippets. What code to use. The difference between .py and .ipy files for startup scripts. Etc.
I am using Ubuntu 12.10. Where do I put my config file for IPython 0.13?
To create a jupyter_notebook_config.py file in the . jupyter directory, with all the defaults commented out, use the following command: $ jupyter notebook --generate-config :ref:`Command line arguments for configuration <config>` settings are documented in the configuration file and the user documentation.
IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.
The notebook server can be run with a variety of command line arguments. A list of available options can be found below in the options section. Defaults for these options can also be set by creating a file named jupyter_notebook_config.py in your Jupyter folder. The Jupyter folder is in your home directory, ~/.
I have c.TerminalInteractiveShell.editor = 'emacsclient'
in ~/.config/ipython/profile_default/ipython_config.py
and it works.
If you have trouble finding config location, use ipython locate profile
command:
http://ipython.org/ipython-doc/rel-0.13/whatsnew/version0.13.html#new-top-level-locate-command
But I think the easiest way to setup editor is to have something like export EDITOR=emacsclient
in your shell setup (e.g. ~/.bashrc
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With