You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
Copy file name to clipboardExpand all lines: README.md
+63-63Lines changed: 63 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,14 @@ Notebook cell vim bindings
16
16
17
17
## Modes
18
18
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.
20
20
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:
22
22
23
-
1. Jupyterlab Command Mode
24
-
2. Jupyterlab Edit Mode
25
-
- Insert
23
+
1. Jupyterlab Command mode
24
+
2. Jupyterlab Edit mode
26
25
- Normal
26
+
- Insert
27
27
- Visual
28
28
29
29
See [key bindings for switching between modes](#switching-between-modes).
To learn how to modify key bindings see the [modify-keybinds.md](modify-keybinds.md) file.
46
46
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>.
49
49
50
-
Shortcuts this extension introduces:
50
+
Shortcuts that this extension introduces:
51
51
52
52
### Vim Ex commands
53
53
54
54
| Command | Action |
55
55
| -------- | -------------------------- |
56
56
|: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 |
107
107
108
108
### Switching between modes
109
109
@@ -114,11 +114,11 @@ Shortcuts this extension introduces:
114
114
- To leave Normal mode to Command mode, several options are available:
115
115
- <kbd>Shift</kbd>+<kbd>Esc</kbd>
116
116
- <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>.
0 commit comments