Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: enable editing_mode = ‘vi’ for a ZMQTerminalIPythonApp console #1215

Open
tzeitim opened this issue Feb 28, 2024 · 0 comments

Comments

@tzeitim
Copy link

tzeitim commented Feb 28, 2024

When starting a vanilla kernel (e.g. invoking ‘ipython’) it is possible to change the editing mode between ‘emacs’ or ‘vi’. There are other ways of doing it but a simple one is to:

ipython
Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.16.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: ip = get_ipython()

In [2]: ip.editing_mode
Out[2]: 'emacs'

In [3]: ip.editing_mode = 'vi'

[ins] In [4]:

But when connecting to a jupyter-lab-made kernel this is not possible:

# after starting a kernel in jupyer lab and getting its info using %connect_info
jupyter console --existing kernel-00463bd1-4faf-4491-a903-a7179a6d4ceb.json
[ZMQTerminalIPythonApp] WARNING | Config option `kernel_spec_manager_class` not recognized by `ZMQTerminalIPythonApp`.  Did you mean `kernel_manager_class`?
Jupyter console 6.6.3

Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.16.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: ip = get_ipython()

In [6]: ip.editing_mode
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[6], line 1
----> 1 ip.editing_mode

AttributeError: 'ZMQInteractiveShell' object has no attribute 'editing_mode'

In [7]:

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

No branches or pull requests

1 participant