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

Pou*_*del 5 python sublimetext3 jupyter 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/