相关疑难解决方法(0)

如何使用键盘快捷键向上/向下移动 Jupyter 笔记本单元格?

有人知道在 Jupyter Notebook 中向上或向下移动单元格的键盘快捷键吗?找不到快捷方式,有什么线索吗?

python jupyter-notebook

15
推荐指数
3
解决办法
9178
查看次数

如何将键盘快捷键永久添加到Jupyter(ipython)笔记本?

我有以下快捷方式配置,在Jupiter笔记本的单元格中运行后可以正常工作:

%%javascript


IPython.keyboard_manager.command_shortcuts.add_shortcut('ctrl-q', {
    help: 'Clear all output',               // This text will show up on the help page (CTRL-M h or ESC h)
    handler: function (event) {             // Function that gets invoked
        if (IPython.notebook.mode == 'command') {
            IPython.notebook.clear_all_output();
            return false;
        }
        return true;                   
    }
  });
Run Code Online (Sandbox Code Playgroud)

如何设置Jupiter笔记本以在启动时自动进行初始化?

我尝试添加相同的代码(没有%%javascript)C:\Users\<username>\.ipython\profile_default\static\custom\custom.js但它没有用.

我只有一个配置文件,使用ipython profile createPython 3.3,Windows 7创建.

提前致谢.

startup ipython ipython-notebook jupyter jupyter-notebook

11
推荐指数
3
解决办法
4848
查看次数

jupyter-notebook 和 jupyter-lab 的自定义键盘快捷键,用于向上/向下移动行

我们可以在 jupyter-notebook 和 jupyter-lab 单元中使用 sublime 风格的键盘快捷键吗?

** 示例要求:**
cmd shift up 将 jupyter 单元格中的行向上移动

注意: 我正在使用 conda 环境使用 jupyter-lab。

我的尝试:

  1. 在 jupyter-lab 中,我将文本编辑器更改为 sublime,它仅适用于文本编辑器,不适用于 jupyter 单元格。

  2. 我关注了这个博客:http : //blog.rtwilson.com/how-to-get-sublime-text-style-editing-in-the-ipythonjupyter-notebook/

    • 将 javascript 放在 ~/.jupyter/custom/custom.js
    • 也试过 ~/miniconda3/lib/python3.6/site-packages/notebook/static/custom/custom.js

cmd-shift-up/down 选择 line 和 above line,不移动它们。

  1. 已安装的扩展 https://github.com/ryantam626/jupyterlab_black

这在 jupyter-cell 中也不起作用。

我们可以这样做吗(在 jupyter 单元中使用 sublime 键盘映射)?

http://blog.rtwilson.com/how-to-get-sublime-text-style-editing-in-the-ipythonjupyter-notebook/

python sublimetext3 jupyter jupyter-notebook jupyter-lab

5
推荐指数
0
解决办法
1041
查看次数