mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Support Ctrl-. to compile for v1 compabitility
This commit is contained in:
parent
09486f2eea
commit
8ecd073efc
1 changed files with 9 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue