All Projects → ianhi → jupyterlab-vimrc

ianhi / jupyterlab-vimrc

Licence: BSD-3-Clause license
add a basic vimrc to jupyterlab vim

Programming Languages

typescript
32286 projects
python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jupyterlab-vimrc

theme-cookiecutter
A cookiecutter template to help you make new JupyterLab theme extensions
Stars: ✭ 47 (-20.34%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab iframe
View html as an embedded iframe in JupyterLab
Stars: ✭ 91 (+54.24%)
Mutual labels:  jupyterlab, jupyterlab-extension
perspective-python
Python APIs for perspective front end
Stars: ✭ 14 (-76.27%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyter bokeh
An extension for rendering Bokeh content in JupyterLab notebooks
Stars: ✭ 165 (+179.66%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-link-share
JupyterLab Extension to easily share a link to a running server on Binder
Stars: ✭ 40 (-32.2%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Go To Definition
Navigate to variable's definition with a click in JupyterLab (or with a few key strokes)
Stars: ✭ 180 (+205.08%)
Mutual labels:  jupyterlab, jupyterlab-extension
Awesome Jupyterlab Extension
😎 A curated list of awesome Jupyterlab extension projects. 🌠 Detailed introduction with images.
Stars: ✭ 198 (+235.59%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab materialdarker
The Material Darker theme for JupyterLab
Stars: ✭ 120 (+103.39%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-kubeflow-kale
JupyterLab extension to provide a Kubeflow specific left area for Notebooks deployment
Stars: ✭ 17 (-71.19%)
Mutual labels:  jupyterlab, jupyterlab-extension
Awesome Jupyter
A curated list of awesome Jupyter projects, libraries and resources
Stars: ✭ 2,523 (+4176.27%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab System Monitor
JupyterLab extension to display system metrics
Stars: ✭ 154 (+161.02%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab tensorboard
Tensorboard extension for jupyterlab.
Stars: ✭ 245 (+315.25%)
Mutual labels:  jupyterlab, jupyterlab-extension
Awesome Jupyterlab
A curated list of awesome JupyterLab extensions and resources
Stars: ✭ 2,035 (+3349.15%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab templates
Support for jupyter notebook templates in jupyterlab
Stars: ✭ 223 (+277.97%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Data Explorer
First class datasets in JupyterLab
Stars: ✭ 146 (+147.46%)
Mutual labels:  jupyterlab, jupyterlab-extension
Best Of Jupyter
🏆 A ranked list of awesome Jupyter Notebook, Hub and Lab projects (extensions, kernels, tools). Updated weekly.
Stars: ✭ 200 (+238.98%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Topbar
JupyterLab Top Bar extension
Stars: ✭ 86 (+45.76%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Spreadsheet
JupyterLab plugin for viewing spreadsheets, such as Excel .xls/.xlsx workbooks and OpenOffice .ods files
Stars: ✭ 95 (+61.02%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Hub
Deprecated: JupyterLab extension for running JupyterLab with JupyterHub
Stars: ✭ 181 (+206.78%)
Mutual labels:  jupyterlab, jupyterlab-extension
knowledgelab
KnowledgeRepo + JupyterLab
Stars: ✭ 46 (-22.03%)
Mutual labels:  jupyterlab, jupyterlab-extension

jupyterlab-vimrc

Github Actions Status

add a basic vimrc to jupyterlab + support for yanking to the system clipboard.

I also recommend:

Install

# for jlab 3+
pip install jupyterlab-vimrc

or for jupyterlab=2

jupyter labextension install [email protected]

Basic Usage

You can modify the contents of this psuedo vimrc by editing the settings using Settings > Advanced Settings Editor (Ctrl+,) and selecting the settings for vimrc. Commands are defined as arrays with the syntax: [lhs, rhs]. For example you can map ii to <Esc> in insert mode by adding the following to the settings:

{
"imap": 
    [
        ["ii", "<Esc>"],
    ],
}

See the Examples for other premade settings files such as hjkl -> jkl;

Supported Commands

Currently supports these commands:

imap
nmap
vmap
inoremap*
nnoremap*
vnoremap*

* noremap caveat

The noremap commands are also availiable but come with several caveats:

The comment for the noremap function in codemirror/keymap/vim.js says the following:

Non-recursive map function.
NOTE: This will not create mappings to key maps that aren't present in the default key map. See TODO at bottom of function.

My reading of this comment and looking through the actual function leads me to believe that the restrictions are:

  1. The right hand side of the mapping must be defined in the default vim.js keymap
  2. The default keymap must not be an [Ex to Ex] or [Key to Key] mapping.

The result will then be that you have changed the lhs for the default keymapping but nothing else. If your mapping doesn't meet these conditions then the mapping will not be performed and this extension will put an error message in the console. So it may be in your best interest to just use the map commands and be careful to not get caught in infinite mapping loops.

Requirements

  • JupyterLab >= 3.0 (pip install jupyterlab-vimrc)
  • JupyterLab >= 2.0 (jupyter labextension install [email protected])
  • JupyterLab >= 1.0 (jupyter labextension install jupyterlab-vimrc@jlab1)

Contributing

Development install

Note: You will need NodeJS to build the extension package.

conda install -c conda-forge nodejs

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the jupyterlab-vimrc directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

Uninstall

pip uninstall jupyterlab-vimrc
jupyter labextension uninstall jupyterlab-vimrc
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].