Git Product home page Git Product logo

jupyterlab-vim's Introduction

jupyterlab-vim

npm version Build Status npm downloads

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.

Modes

This extension splits Jupyter edit mode into two modes: Vim command mode and Vim insert mode. Three editing modes now exist: Jupyter command, Vim command, and Vim insert.

Install

Prerequisites

  • JupyterLab 1.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

Command Action
:w[rite] Save Notebook
:q[uit] Enter Jupyter command mode

Vim command bindings

Chord Action
Ctrl-O, U Undo Cell Action
- Split Cell at Cursor
Ctrl-O, - Split Cell at Cursor
Ctrl-O, D Cut Cell
Ctrl-O, Y Copy Cell
Ctrl-O, P Paste Cell
Ctrl-Shift-J Extend Marked Cells Below
Ctrl-Shift-K Extend Marked Cells Above
Ctrl-O, O Insert Cell Below
Ctrl-O, Ctrl-O Insert Cell Above
Ctrl-J Select Cell Below
Ctrl-K Select Cell Above
Ctrl-O, G Select First Cell
Ctrl-O, Ctrl-G Select Last Cell
Ctrl-E Move Cell Down
Ctrl-Y Move Cell Up
Ctrl-O, Z, Z Center Cell
Ctrl-G Show Tooltip
Command/Ctrl-1 Code Cell Mode
Command/Ctrl-2 Markdown Cell Mode
Command/Ctrl-3 Raw Cell Mode
Shift-Escape Leave Vim Mode

Jupyter command bindings

Chord Action
G, G Select First Cell
Shift-G Select Last Cell
D, D Delete Cell
Y, Y Yank (Copy) Cell
P Paste Cell
Shift-P Paste Cell Above
O Insert Cell
Shift-O Insert Cell Above
U Undo Cell Action
Ctrl-E Move Cells Down
Ctrl-Y Move Cells Up
Z, Z Center Cell

Contributing

Contributions and feedback are most welcome!

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

jupyterlab-vim's People

Contributors

jwkvam avatar ah- avatar llinfeng avatar mistervulcan avatar stsievert avatar blink1073 avatar willprice avatar wmayner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.