Merge branch 'main' of github.com:overleaf/internal

GitOrigin-RevId: b0a13b4b4f7ede46d5ac5478dd03642d59e11a98
This commit is contained in:
Christopher Hoskin 2023-05-19 09:29:27 +01:00 committed by Copybot
parent b35db4827d
commit 5bbe427ed0

View file

@ -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('<Tab>', undefined, undefined, undefined, {
context: 'normal',
})
Vim.mapCommand('<Tab>', undefined, undefined, undefined, {
context: 'visual',
})
Vim.mapCommand('<S-Tab>', undefined, undefined, undefined, {
context: 'normal',
})
Vim.mapCommand('<S-Tab>', undefined, undefined, undefined, {
context: 'visual',
})
// Make the Vim 'write' command start a compile
CodeMirror.commands.save = () => {