From 8ecd073efca5264cbd6a410361e7d5d55383360a Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 3 May 2018 12:28:14 +0100 Subject: [PATCH] Support Ctrl-. to compile for v1 compabitility --- .../coffee/ide/editor/directives/aceEditor.coffee | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee index 2552a7a95d..61760d0117 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee @@ -112,13 +112,21 @@ define [ # Prevert Ctrl|Cmd-S from triggering save dialog scope.$watch "onSave", (callback) -> if callback? + Vim.defineEx 'write', 'w', callback editor.commands.addCommand name: "save", bindKey: win: "Ctrl-S", mac: "Command-S" exec: () -> callback() readOnly: true - Vim.defineEx 'write', 'w', callback + # Not technically 'save', but Ctrl-. recompiles in OL v1 + # so maintain compatibility + editor.commands.addCommand + name: "recompile_v1", + bindKey: win: "Ctrl-.", mac: "Ctrl-." + exec: () -> + callback() + readOnly: true editor.commands.removeCommand "transposeletters" editor.commands.removeCommand "showSettingsMenu" editor.commands.removeCommand "foldall"