ipython - ipython 中的括号匹配

标签 ipython jupyter-notebook

IPython 中是否有自动关闭方括号、引号、圆括号等的选项?

我希望有一个类似于 gedit 插件中的功能。

最佳答案

通过调整 ~/.inputrc 可以让应用程序(包括 IPython)使用 readline 在输入左括号时自动添加右括号,如建议的 here 所示。 ,例如通过增加: "(": "\C-v()\e[D"

请注意,根据 IPython 的创建者 automatic bracket matching can't be done在普通的基于 readline 的应用程序中(即在正常的 IPython 终端 session 中)。尽管它已经是 IPython 的 qtconsole 标准功能的一部分(尽管如下所述,当前无法自动关闭括号)。

关于ipython - ipython 中的括号匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15715837/

相关文章:

ubuntu - 如何让 LaTeX 在 IPython notebook 中工作?

python - HoloViews DynamicMap 悬停工具不会使用所选变量更新

python - 清除 Jupyter Python 笔记本中的 MatPlotLib 图

python - Windows下Jupyter中的kernel-1234.json在哪里?

linux - 突出显示选择和中间按钮粘贴到 jupyter notebook 中?

python - IPython 导入错误 - 模式

python-3.x - 用于 WebSocket 通信的 Jupyter

python - IPython.显示 : SVG cannot render a svg image generated by svg_filter_line (official example)

amazon-web-services - 如何在 SageMaker 上安排任务

python - jupyter 抛出错误 : socket. gaierror: [Errno -2] Name or service not known