Skip to content

Commit 9b44041

Browse files
authored
Readme cleanup (#154)
* Initial cleanup * Lint * Abbreviate `cmd`, revise "change cell type" binding description to follow JL and revise `Shift` description * Reorder key bindings so that corresponding Edit mode and Command mode bindings are in the same order * More fixes
1 parent c08147b commit 9b44041

File tree

1 file changed

+63
-63
lines changed

1 file changed

+63
-63
lines changed

README.md

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Notebook cell vim bindings
1616

1717
## Modes
1818

19-
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.
19+
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.
2020

21-
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:
21+
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:
2222

23-
1. Jupyterlab Command Mode
24-
2. Jupyterlab Edit Mode
25-
- Insert
23+
1. Jupyterlab Command mode
24+
2. Jupyterlab Edit mode
2625
- Normal
26+
- Insert
2727
- Visual
2828

2929
See [key bindings for switching between modes](#switching-between-modes).
@@ -44,66 +44,66 @@ mamba install -c conda-forge jupyterlab_vim
4444

4545
To learn how to modify key bindings see the [modify-keybinds.md](modify-keybinds.md) file.
4646

47-
**Please note that all keys are lowercase unless `Shift` is explicitly indicated.**
48-
For example, `Y, Y` is two lowercase `y`s, `Shift-Y, Y` is one uppercase `Y` followed by a lowercase `y`.
47+
**Please note that all keys are lowercase unless <kbd>Shift</kbd> is explicitly indicated.**
48+
For example, "<kbd>Y</kbd>, <kbd>Y</kbd>" means pressing lowercase <kbd>y</kbd> twice, while "<kbd>Shift-Y</kbd>, <kbd>Y</kbd>" means pressing <kbd>Shift</kbd>+<kbd>y</kbd> followed by a lowercase <kbd>y</kbd>.
4949

50-
Shortcuts this extension introduces:
50+
Shortcuts that this extension introduces:
5151

5252
### Vim Ex commands
5353

5454
| Command | Action |
5555
| -------- | -------------------------- |
5656
| :w[rite] | Save Notebook |
57-
| :q[uit] | Enter Jupyter command mode |
58-
59-
### Vim command bindings
60-
61-
| Chord | Action |
62-
| --------------- | ------------------------- |
63-
| Ctrl-O, U | Undo Cell Action |
64-
| - | Split Cell at Cursor |
65-
| Ctrl-O, - | Split Cell at Cursor |
66-
| Ctrl-O, D | Cut Cell |
67-
| Ctrl-O, Y | Copy Cell |
68-
| Ctrl-O, P | Paste Cell |
69-
| Ctrl-Shift-J | Extend Marked Cells Below |
70-
| Ctrl-Shift-K | Extend Marked Cells Above |
71-
| Ctrl-O, O | Insert Cell Below |
72-
| Ctrl-O, Ctrl-O | Insert Cell Above |
73-
| Ctrl-J | Select Cell Below |
74-
| Ctrl-K | Select Cell Above |
75-
| Ctrl-O, G | Select First Cell |
76-
| Ctrl-O, Ctrl-G | Select Last Cell |
77-
| Ctrl-E | Move Cell Down |
78-
| Ctrl-Y | Move Cell Up |
79-
| Ctrl-O, Z, Z | Center Cell |
80-
| Ctrl-G | Show Tooltip |
81-
| Command/Ctrl-1 | Code Cell Mode |
82-
| Command/Ctrl-2 | Markdown Cell Mode |
83-
| Command/Ctrl-3 | Raw Cell Mode |
84-
| Shift-Escape | Leave Vim Mode |
85-
| Escape, Ctrl-\[ | Exit Vim Insert Mode |
86-
87-
### Jupyter command bindings
88-
89-
| Chord | Action |
90-
| ------- | ------------------- |
91-
| G, G | Select First Cell |
92-
| Shift-G | Select Last Cell |
93-
| D, D | Delete Cell |
94-
| Y, Y | Yank (Copy) Cell |
95-
| P | Paste Cell |
96-
| Shift-P | Paste Cell Above |
97-
| O | Insert Cell |
98-
| Shift-O | Insert Cell Above |
99-
| U | Undo Cell Action |
100-
| Ctrl-E | Move Cells Down |
101-
| Ctrl-Y | Move Cells Up |
102-
| Z, Z | Center Cell |
103-
| Z, C | Hide Code Cell |
104-
| Z, O | Show Code Cell |
105-
| Z, M | Hide All Code Cells |
106-
| Z, R | Show All Code Cells |
57+
| :q[uit] | Enter Jupyter Command Mode |
58+
59+
### Vim (Jupyter Edit mode) bindings
60+
61+
| Shortcut | Action |
62+
| -------------- | ------------------------- |
63+
| - | Split Cell at Cursor |
64+
| Ctrl-O, - | Split Cell at Cursor |
65+
| Ctrl-Shift-J | Extend Marked Cells Below |
66+
| Ctrl-Shift-K | Extend Marked Cells Above |
67+
| Ctrl-J | Select Cell Below |
68+
| Ctrl-K | Select Cell Above |
69+
| Ctrl-O, G | Select First Cell |
70+
| Ctrl-O, Ctrl-G | Select Last Cell |
71+
| Ctrl-O, O | Insert Cell Below |
72+
| Ctrl-O, Ctrl-O | Insert Cell Above |
73+
| Ctrl-O, D | Delete (Cut) Cell |
74+
| Ctrl-O, Y | Yank (Copy) Cell |
75+
| Ctrl-O, P | Paste Cell Below |
76+
| Ctrl-E | Move Cell Down |
77+
| Ctrl-Y | Move Cell Up |
78+
| Ctrl-O, U | Undo Cell Action |
79+
| Ctrl-O, Z, Z | Center Cell |
80+
| Ctrl-G | Show Tooltip |
81+
| Cmd/Ctrl-1 | Change to Code Cell |
82+
| Cmd/Ctrl-2 | Change to Markdown Cell |
83+
| Cmd/Ctrl-3 | Change to Raw Cell |
84+
| Shift-Esc | Exit to Command Mode |
85+
| Esc or Ctrl-\[ | Exit Current Mode |
86+
87+
### Jupyter Command mode bindings
88+
89+
| Shortcut | Action |
90+
| -------- | ------------------- |
91+
| G, G | Select First Cell |
92+
| Shift-G | Select Last Cell |
93+
| O | Insert Cell Below |
94+
| Shift-O | Insert Cell Above |
95+
| D, D | Delete (Cut) Cell |
96+
| Y, Y | Yank (Copy) Cell |
97+
| P | Paste Cell Below |
98+
| Shift-P | Paste Cell Above |
99+
| Ctrl-E | Move Cells Down |
100+
| Ctrl-Y | Move Cells Up |
101+
| U | Undo Cell Action |
102+
| Z, Z | Center Cell |
103+
| Z, C | Hide Code Cell |
104+
| Z, O | Show Code Cell |
105+
| Z, M | Hide All Code Cells |
106+
| Z, R | Show All Code Cells |
107107

108108
### Switching between modes
109109

@@ -114,11 +114,11 @@ Shortcuts this extension introduces:
114114
- To leave Normal mode to Command mode, several options are available:
115115
- <kbd>Shift</kbd>+<kbd>Esc</kbd>
116116
- <kbd>Esc</kbd> or <kbd>Ctrl</kbd>+<kbd>[</kbd>, 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.
117-
- To enter Insert mode from Normal mode, use one of the insert commmands, such as <kbd>i</kbd>, <kbd>I</kbd>, <kbd>a</kbd>, <kbd>A</kbd>, <kbd>o</kbd>, <kbd>O</kbd>, <kbd>c</kbd>, <kbd>C</kbd>, <kbd>s</kbd> or <kbd>S</kbd>.
118-
- To enter Visual Mode from Normal mode, use one of the visual commands, such as <kbd>v</kbd>, <kbd>V</kbd> or <kbd>Ctrl</kbd>+<kbd>V</kbd>.
119-
- From Insert or Visual modes:
120-
- To leave Insert or Visual modes to Normal Mode, press <kbd>Esc</kbd> or <kbd>Ctrl</kbd>+<kbd>[</kbd>.
121-
- To leave Insert or Visual modes to Command Mode, press <kbd>Shift</kbd>+<kbd>Esc</kbd>.
117+
- To enter Insert mode from Normal mode, use one of the insert commmands, such as <kbd>i</kbd>, <kbd>Shift</kbd>+<kbd>i</kbd>, <kbd>a</kbd>, <kbd>Shift</kbd>+<kbd>a</kbd>, <kbd>o</kbd>, <kbd>Shift</kbd>+<kbd>o</kbd>, <kbd>c</kbd>, <kbd>Shift</kbd>+<kbd>c</kbd>, <kbd>s</kbd> or <kbd>Shift</kbd>+<kbd>s</kbd>.
118+
- To enter Visual mode from Normal mode, use one of the visual commands, such as <kbd>v</kbd>, <kbd>Shift</kbd>+<kbd>v</kbd> or <kbd>Ctrl</kbd>+<kbd>v</kbd>.
119+
- From Insert or Visual mode:
120+
- To leave Insert or Visual mode to Normal mode, press <kbd>Esc</kbd> or <kbd>Ctrl</kbd>+<kbd>[</kbd>.
121+
- To leave Insert or Visual mode to Command mode, press <kbd>Shift</kbd>+<kbd>Esc</kbd>.
122122

123123
## Special Thanks
124124

0 commit comments

Comments
 (0)