jupyter-lab推荐以及vim,colemak 配置

Jupyter-lab推荐以及vim,colemak 配置

上一篇文章 介绍了 jupyter-notebook 怎样 mapjupyterlab 是新一代的 jupyter-notebook, 有点像R-Studio, 有更多的功能了。

文章目录

  • Jupyter-lab推荐以及vim,colemak 配置
    • TL; DR
    • 安装`jupyterlab`
    • 安装 extension
      • 1. vim binding
      • 2. vim keymap
        • 配置

TL; DR

  • install
# For jupyterlab 2.0
jupyter-labextension install @axlair/jupyterlab_vim
# vimrc
jupyter-labextension install jupyterlab-vimrc
  • config
    "nmap": [
        ["n","j"],
        ["e","k"]
    ],

安装jupyterlab

pip install --user jupyterlab
# or
conda activate 
conda install jupyterlab

安装 extension

1. vim binding

# jupyterlab 1.0
jupyter labextension install jupyterlab_vim
# jupyterlab 2.0
jupyter-labextension install @axlair/jupyterlab_vim

2. vim keymap

jupyter-labextension install jupyterlab-vimrc

配置

jupyter-lab推荐以及vim,colemak 配置_第1张图片
2.
在这里插入图片描述
3. 仅供参考

{
    // vimrc
    // jupyterlab-vimrc:vimrc
    // Settings to be applied to codemirror vim mode
    // *********************************************

    // imap commands
    // [lhs, rhs] - e.g. "imap": [["ii", ""]]
    "imap": [
    ],

    // inoremap commands
    // [lhs, rhs]
    "inoremap": [
        []
    ],

    // nmap commands
    // [lhs, rhs]
    "nmap": [
        ["n","j"],
        ["e","k"]

    ],

    // nnoremap commands
    // [lhs, rhs]
    "nnoremap": [
        ["i","l"],
        ["m","n"],
        ["k","m"],
        ["f","e"],
        ["t","f"],
        ["l","u"],
        ["u","i"],
        
        ["N","J"],
        ["E","K"],
        ["I","L"],
        ["M","N"],
        ["K","M"],
        ["F","E"],
        ["T","F"],
        ["L","U"],
        ["U","I"],
        ["\'","'"]
    ],

    // vmap commands
    // [lhs, rhs]
    "vmap": [
        
    ],

    // vnoremap commands
    // [lhs, rhs]
    "vnoremap": [
        ["n","j"],
        ["e","k"],
        ["i","l"],
        ["k","n"],
        ["f","e"],
        ["t","f"],
        ["l","u"],
        ["u","i"],
        
        ["N","J"],
        ["E","K"],
        ["I","L"],
        ["K","N"],
        ["F","E"],
        ["T","F"],
        ["L","U"],
        ["U","I"],
        
        ["\'",":"]
    ]
}

其中需要注意的是

    "nmap": [
        ["n","j"],
        ["e","k"]
    ],

可能是因为 jupyterlab_vim, 会涉及到cell之间的跳转,所以需要使用nmap

你可能感兴趣的:(vim,colemak,随笔)