0.12.0 • Published 4 years ago

@mr_qubo/jupyterlab_vim v0.12.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@mr_qubo/jupyterlab-vim

This is a fork of jwkvam/jupyterlab-vim. See About this fork.

Notebook cell vim bindings

jlabvim

Special Thanks

I want to acknowledge Alisue and his excellent work creating vim bindings for Jupyter notebooks. I hope this extension can meet the high bar his work set.

About this fork

I've created this fork because I'm using Jupyter command mode and I find Vim command mode not useful, I want it to work more like a typical normal mode from Vim.

Changes

  • Moving past editor buffer doesn't move cursor to the previous/next cell.
  • Vim command mode can be exited with Escape.

Install

Prerequisites

  • JupyterLab 2.0

Install or upgrade

jupyter labextension install jupyterlab_vim

Uninstall

jupyter labextension uninstall jupyterlab_vim

Key Bindings

Please note that all keys are lowercase unless Shift is explicitly indicated. For example, Y, Y is two lowercase ys, Shift-Y, Y is one uppercase Y followed by a lowercase y.

Shortcuts this extension introduces:

Vim Ex commands

CommandAction
:writeSave Notebook
:quitEnter Jupyter command mode

Vim command bindings

ChordAction
Ctrl-O, UUndo Cell Action
-Split Cell at Cursor
Ctrl-O, -Split Cell at Cursor
Ctrl-O, DCut Cell
Ctrl-O, YCopy Cell
Ctrl-O, PPaste Cell
Ctrl-Shift-JExtend Marked Cells Below
Ctrl-Shift-KExtend Marked Cells Above
Ctrl-O, OInsert Cell Below
Ctrl-O, Ctrl-OInsert Cell Above
Ctrl-JSelect Cell Below
Ctrl-KSelect Cell Above
Ctrl-O, GSelect First Cell
Ctrl-O, Ctrl-GSelect Last Cell
Ctrl-EMove Cell Down
Ctrl-YMove Cell Up
Ctrl-O, Z, ZCenter Cell
Ctrl-GShow Tooltip
Command/Ctrl-1Code Cell Mode
Command/Ctrl-2Markdown Cell Mode
Command/Ctrl-3Raw Cell Mode
Shift-EscapeLeave Vim Mode
EscapeLeave Vim Mode

Jupyter command bindings

ChordAction
G, GSelect First Cell
Shift-GSelect Last Cell
D, DDelete Cell
Y, YYank (Copy) Cell
PPaste Cell
Shift-PPaste Cell Above
OInsert Cell
Shift-OInsert Cell Above
UUndo Cell Action
Ctrl-EMove Cells Down
Ctrl-YMove Cells Up
Z, ZCenter Cell

Contributing

Contributions and feedback are most welcome!

npm.ionpm.ionpm.ionpm.ionpm.ionpm.ionpm.ionpm.io

Development

For a development install (requires npm version 4 or later), do the following in the repository directory. Please note, you need to make sure that you satisfy all the prerequisites, i.e. the JupyterLab version.

jlpm install
jlpm run build
jupyter labextension link .

To rebuild the package and the JupyterLab app:

jlpm run build
jupyter lab build