diff --git a/services/web/frontend/js/features/source-editor/extensions/keybindings.ts b/services/web/frontend/js/features/source-editor/extensions/keybindings.ts index 6139b77bba..c2f8a62169 100644 --- a/services/web/frontend/js/features/source-editor/extensions/keybindings.ts +++ b/services/web/frontend/js/features/source-editor/extensions/keybindings.ts @@ -85,7 +85,22 @@ const customiseVimOnce = (Vim: any, CodeMirror: any) => { Vim.defineAction('unfoldCode', function (cm: CodeMirror) { unfoldCode(cm.cm6) }) - Vim.mapCommand('zo', 'action', 'unfoldCode') + + // disable tab and shift-tab keys in command (normal) and visual modes + // using "undefined" params because mapCommand signature is: + // mapCommand(keys, type, name, args, extra) + Vim.mapCommand('', undefined, undefined, undefined, { + context: 'normal', + }) + Vim.mapCommand('', undefined, undefined, undefined, { + context: 'visual', + }) + Vim.mapCommand('', undefined, undefined, undefined, { + context: 'normal', + }) + Vim.mapCommand('', undefined, undefined, undefined, { + context: 'visual', + }) // Make the Vim 'write' command start a compile CodeMirror.commands.save = () => {