diff --git a/vim.js b/vim.js --- a/vim.js +++ b/vim.js @@ -236,6 +236,8 @@ export function initVim(CM) { { keys: '"', type: 'action', action: 'setRegister' }, { keys: '', type: 'action', action: 'insertRegister', context: 'insert', isEdit: true }, { keys: '', type: 'action', action: 'oneNormalCommand', context: 'insert' }, + // OpenIDEA: insert-mode undo break; the host defines this action. + { keys: 'u', type: 'action', action: 'openideaUndoBreak', context: 'insert' }, { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }}, { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }}, @@ -3423,6 +3425,8 @@ export function initVim(CM) { cm.replaceSelection(text); } }, + // OpenIDEA: the host overrides this with the undo-break implementation. + openideaUndoBreak: function() {}, oneNormalCommand: function(cm, actionArgs, vim) { exitInsertMode(cm, true); vim.insertModeReturn = true;