Skip to content

Commit 38829ab

Browse files
committed
+ Keybindings for Vintage Mode
1 parent 4c4490b commit 38829ab

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,60 @@ While the plugin looks stable so far and I am trying to preserve as much of the
2424
2. I am using websocket-client library from https://github.com/liris/websocket-client and (slightly patched) subset of the IPython. You do not have to install them separately.
2525
3. ST3 port was contributed by [chirswl](https://github.com/chriswl)
2626
4. Dark theme, support for password-protected servers and nicer last-used-server picker was contributed by [z-m-k](https://github.com/z-m-k)
27+
28+
## Vintage Mode
29+
In Vintage mode, for the navigation keys to work as expected in IPython Notebook buffer, you need to modify some keybindings. Add the following to your `Key Bindings - User`.
30+
31+
1. Add a `context key` to `Shift+Enter` so you can run a cell with `Shift+Enter` in the command mode:
32+
33+
```
34+
{ "keys": ["shift+enter"], "command": "set_motion", "args": {
35+
"motion": "move",
36+
"motion_args": {"by": "lines", "forward": true, "extend": true }},
37+
"context": [
38+
{ "key": "setting.command_mode"},
39+
{ "key": "setting.ipython_notebook", "operator": "equal", "operand": false },
40+
]
41+
},
42+
```
43+
2. Command mode Up/Down navigation keys:
44+
45+
```
46+
{ "keys": ["j"], "command": "set_motion", "args": {
47+
"motion": "move",
48+
"motion_args": {"by": "lines", "forward": true, "extend": true },
49+
"linewise": true },
50+
"context": [
51+
{ "key": "setting.command_mode"},
52+
{ "key": "setting.ipython_notebook", "operator": "equal", "operand": false },
53+
]
54+
},
55+
56+
{
57+
"keys": ["j"], "command": "inb_move_up",
58+
"context" : [
59+
{ "key": "setting.command_mode"}
60+
{ "key": "setting.ipython_notebook", "operator": "equal", "operand": true },
61+
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
62+
]
63+
},
64+
65+
{ "keys": ["k"], "command": "set_motion", "args": {
66+
"motion": "move",
67+
"motion_args": {"by": "lines", "forward": false, "extend": true },
68+
"linewise": true },
69+
"context": [
70+
{ "key": "setting.command_mode"},
71+
{ "key": "setting.ipython_notebook", "operator": "equal", "operand": false },
72+
]
73+
},
74+
75+
{
76+
"keys": ["k"], "command": "inb_move_down",
77+
"context" : [
78+
{ "key": "setting.command_mode"},
79+
{ "key": "setting.ipython_notebook", "operator": "equal", "operand": true },
80+
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
81+
]
82+
},
83+
```

0 commit comments

Comments
 (0)