Skip to content

Commit 7977c42

Browse files
authored
Fix empty command (#133)
* Fix empty command * Fix a typo in command name
1 parent fc42ef6 commit 7977c42

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

schema/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
{
139139
"selector": ".jp-NotebookPanel[data-jp-vim-mode='true'][data-jp-vim-shift-esc-override-browser='true'] .jp-Notebook.jp-mod-commandMode",
140140
"keys": ["Shift Escape"],
141-
"command": ""
141+
"command": "vim:no-action"
142142
},
143143
{
144144
"selector": ".jp-NotebookPanel[data-jp-vim-mode='true'] .jp-Notebook:focus",

src/labCommands.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export function addNotebookCommands(
166166
isEnabled
167167
}),
168168
commands.addCommand('vim:leave-current-mode', {
169-
label: 'Move Insert to Normal to Jupyter Command Mode"',
169+
label: 'Move Insert to Normal to Jupyter Command Mode',
170170
execute: args => {
171171
const current = getCurrent(args);
172172

@@ -284,6 +284,14 @@ export function addNotebookCommands(
284284
}
285285
},
286286
isEnabled
287+
}),
288+
commands.addCommand('vim:no-action', {
289+
label: 'Prevent Default Browser Action',
290+
caption:
291+
'Prevent default action for some keybindings (defined in the settings); for example Firefox binds Shift + Esc to its Process Manager which conflicts with the expected action in the vim mode.',
292+
execute: args => {
293+
// no-op
294+
}
287295
})
288296
];
289297
return addedCommands;

0 commit comments

Comments
 (0)