diff --git a/README.md b/README.md index 46e128e..07f58ad 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,14 @@ Notebook cell vim bindings ## Modes -Like vim, Jupyterlab has a distinction between edit mode and command mode. Jupyterlab Command mode is when the cursor is not in a specific cell, and edit mode when typing in a cell. +Like vim, Jupyterlab has a distinction between Edit mode and Command mode. Jupyterlab is in Command mode when the cursor is not in a specific cell, and it is in Edit mode when typing in a cell. -This extension combines the Jupyterlab (Edit and Command) modes with the standard vim modes (Normal, Insert, Visual). So the set of modes now looks like: +This extension combines the Jupyterlab (Edit and Command) modes with the standard vim modes (Normal, Insert and Visual). So the set of modes now looks like: -1. Jupyterlab Command Mode -2. Jupyterlab Edit Mode - - Insert +1. Jupyterlab Command mode +2. Jupyterlab Edit mode - Normal + - Insert - Visual See [key bindings for switching between modes](#switching-between-modes). @@ -44,66 +44,66 @@ mamba install -c conda-forge jupyterlab_vim To learn how to modify key bindings see the [modify-keybinds.md](modify-keybinds.md) file. -**Please note that all keys are lowercase unless `Shift` is explicitly indicated.** -For example, `Y, Y` is two lowercase `y`s, `Shift-Y, Y` is one uppercase `Y` followed by a lowercase `y`. +**Please note that all keys are lowercase unless Shift is explicitly indicated.** +For example, "Y, Y" means pressing lowercase y twice, while "Shift-Y, Y" means pressing Shift+y followed by a lowercase y. -Shortcuts this extension introduces: +Shortcuts that 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 | -| Escape, Ctrl-\[ | Exit Vim Insert 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 | -| Z, C | Hide Code Cell | -| Z, O | Show Code Cell | -| Z, M | Hide All Code Cells | -| Z, R | Show All Code Cells | +| :q[uit] | Enter Jupyter Command Mode | + +### Vim (Jupyter Edit mode) bindings + +| Shortcut | Action | +| -------------- | ------------------------- | +| - | Split Cell at Cursor | +| Ctrl-O, - | Split Cell at Cursor | +| Ctrl-Shift-J | Extend Marked Cells Below | +| Ctrl-Shift-K | Extend Marked Cells 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-O, O | Insert Cell Below | +| Ctrl-O, Ctrl-O | Insert Cell Above | +| Ctrl-O, D | Delete (Cut) Cell | +| Ctrl-O, Y | Yank (Copy) Cell | +| Ctrl-O, P | Paste Cell Below | +| Ctrl-E | Move Cell Down | +| Ctrl-Y | Move Cell Up | +| Ctrl-O, U | Undo Cell Action | +| Ctrl-O, Z, Z | Center Cell | +| Ctrl-G | Show Tooltip | +| Cmd/Ctrl-1 | Change to Code Cell | +| Cmd/Ctrl-2 | Change to Markdown Cell | +| Cmd/Ctrl-3 | Change to Raw Cell | +| Shift-Esc | Exit to Command Mode | +| Esc or Ctrl-\[ | Exit Current Mode | + +### Jupyter Command mode bindings + +| Shortcut | Action | +| -------- | ------------------- | +| G, G | Select First Cell | +| Shift-G | Select Last Cell | +| O | Insert Cell Below | +| Shift-O | Insert Cell Above | +| D, D | Delete (Cut) Cell | +| Y, Y | Yank (Copy) Cell | +| P | Paste Cell Below | +| Shift-P | Paste Cell Above | +| Ctrl-E | Move Cells Down | +| Ctrl-Y | Move Cells Up | +| U | Undo Cell Action | +| Z, Z | Center Cell | +| Z, C | Hide Code Cell | +| Z, O | Show Code Cell | +| Z, M | Hide All Code Cells | +| Z, R | Show All Code Cells | ### Switching between modes @@ -114,11 +114,11 @@ Shortcuts this extension introduces: - To leave Normal mode to Command mode, several options are available: - Shift+Esc - Esc or Ctrl+[, if the "Enable `Esc` and `Ctrl-[` leaving vim Normal mode to Jupyter Command mode" option is enabled (on by default). To disable the option, go to Settings menu → Settings Editor → Notebook Vim. - - To enter Insert mode from Normal mode, use one of the insert commmands, such as i, I, a, A, o, O, c, C, s or S. - - To enter Visual Mode from Normal mode, use one of the visual commands, such as v, V or Ctrl+V. -- From Insert or Visual modes: - - To leave Insert or Visual modes to Normal Mode, press Esc or Ctrl+[. - - To leave Insert or Visual modes to Command Mode, press Shift+Esc. + - To enter Insert mode from Normal mode, use one of the insert commmands, such as i, Shift+i, a, Shift+a, o, Shift+o, c, Shift+c, s or Shift+s. + - To enter Visual mode from Normal mode, use one of the visual commands, such as v, Shift+v or Ctrl+v. +- From Insert or Visual mode: + - To leave Insert or Visual mode to Normal mode, press Esc or Ctrl+[. + - To leave Insert or Visual mode to Command mode, press Shift+Esc. ## Special Thanks