Skip to content

Commit bba5de0

Browse files
ulugbeknarebornix
andauthored
fix(keybindings): make tab and escape play nicer with native vscode keybindings (#9560)
* fix(keybindings): make tab and escape play nicer with native vscode keybindings fixes: - `extension.vim_tab` should not take priority over `tab` keybinding that accepts Next Edit Suggestions (aka Inline Edits; NES for short) - `extension.vim_escape` should not take priority over: - `escape` keybinding to hide inline suggestion/completion (eg. Copilot's ghost text completion) - `escape` keybinding to hide NES - `escape` to hide: - testing-explorer peek - suggest (aka intellisense) widget - find widget (escape currently cannot hide find widget if it's not focused) - dirty-diff widget - de-focusing notebook cell when vim is in normal mode * remove `findWidget` clause --------- Co-authored-by: Peng Lyu <[email protected]>
1 parent dfd7c46 commit bba5de0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
{
6868
"key": "Escape",
6969
"command": "extension.vim_escape",
70-
"when": "editorTextFocus && vim.active && !inDebugRepl"
70+
"when": "editorTextFocus && vim.active && !inDebugRepl && !inlineSuggestionVisible && !inlineEditIsVisible && !testing.isPeekVisible && !testing.isInPeek && !suggestWidgetVisible && !dirtyDiffVisible && (vim.mode == 'Insert' || !notebookEditorFocused)"
7171
},
7272
{
7373
"key": "Escape",
@@ -112,7 +112,7 @@
112112
{
113113
"key": "tab",
114114
"command": "extension.vim_tab",
115-
"when": "editorTextFocus && vim.active && vim.mode != 'Insert' && !inDebugRepl"
115+
"when": "editorTextFocus && vim.active && vim.mode != 'Insert' && !inDebugRepl && !inlineEditIsVisible"
116116
},
117117
{
118118
"key": "shift+tab",

0 commit comments

Comments
 (0)