Add key shortcut to toggle the review panel.

This commit is contained in:
Paulo Reis 2017-05-18 11:02:50 +01:00
parent 7c26628ce0
commit 832764dd3d
2 changed files with 11 additions and 0 deletions

View file

@ -50,6 +50,7 @@ div.full-size(
read-only="!permissions.write",
file-name="editor.open_doc_name",
on-ctrl-enter="recompileViaKey",
on-ctrl-j="toggleReviewPanel",
syntax-validation="settings.syntaxValidation",
review-panel="reviewPanel",
events-bridge="reviewPanelEventsBridge"

View file

@ -51,6 +51,7 @@ define [
navigateHighlights: "="
fileName: "="
onCtrlEnter: "="
onCtrlJ: "="
syntaxValidation: "="
reviewPanel: "="
eventsBridge: "="
@ -162,6 +163,15 @@ define [
callback()
readOnly: true
scope.$watch "onCtrlJ", (callback) ->
if callback?
editor.commands.addCommand
name: "toggle-review-panel",
bindKey: win: "Ctrl-J", mac: "Command-J"
exec: (editor) =>
callback()
readOnly: true
# Make '/' work for search in vim mode.
editor.showCommandLine = (arg) =>
if arg == "/"