Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctrl-[ exits insert mode #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# History

## 0.11.1 / 2019-10-08

* `ctrl [` exits Vim insert mode

## 0.11.0 / 2019-07-13

* Support JupyterLab 1.0.0+
Expand Down
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,31 @@ Shortcuts this extension introduces:

### 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 |
| 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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyterlab_vim",
"version": "0.11.0",
"version": "0.11.1",
"description": "Code cell vim bindings",
"author": "Jacques Kvam",
"license": "MIT",
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ function activateCellVim(app: JupyterFrontEnd, tracker: INotebookTracker): Promi
keys: ['Escape'],
command: 'leave-insert-mode'
});
commands.addKeyBinding({
selector: '.jp-Notebook.jp-mod-editMode',
keys: ['Ctrl ['],
command: 'leave-insert-mode'
});
commands.addKeyBinding({
selector: '.jp-Notebook:focus',
keys: ['Ctrl I'],
Expand Down