Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


JupyterLab add vim bindings

19 Apr 2020 » productivity

opt 2

search vim

find this file

[root@lab-pyspark static]# find / -name "830.a12559071416e84a884f.js"
/root/miniconda3/envs/pyspark_env/lib/python3.10/site-packages/jupyterlab_vim/labextension/static/830.a12559071416e84a884f.js
/root/miniconda3/envs/pyspark_env/share/jupyter/labextensions/@axlair/jupyterlab_vim/static/830.a12559071416e84a884f.js
cat <EOF >> "/root/miniconda3/envs/pyspark_env/share/jupyter/labextensions/@axlair/jupyterlab_vim/static/830.a12559071416e84a884f.js"
function crashlakerloop(){
    ccc = document.querySelector('.CodeMirror')
    console.log('>>>ccc', ccc)
    try{
        ccc.CodeMirror.constructor.Vim.map('kj', '<Esc>', 'insert');
    }catch{
        setTimeout(() => {crashlakerloop()}, 1000)
    }
}
crashlakerloop()
EOF

layout: post title: “JupyterLab add vim bindings” comments: true date: “2020-04-19 15:34:10.705000+00:00” —

https://github.com/jwkvam/jupyterlab-vim/issues/17

git clone https://github.com/jwkvam/jupyterlab-vim.git

git checkout v0.10.1

edit src/index.ts

lvim.map('kj', '<Esc>', 'insert')

jlpm install

jlpm run build

jupyter labextension link .