mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix toggle comment hotkey for European keyboards
This commit is contained in:
parent
6143b2218c
commit
5cfd4e0d1f
1 changed files with 15 additions and 0 deletions
|
@ -70,6 +70,21 @@ define [
|
||||||
editor.commands.removeCommand "showSettingsMenu"
|
editor.commands.removeCommand "showSettingsMenu"
|
||||||
editor.commands.removeCommand "foldall"
|
editor.commands.removeCommand "foldall"
|
||||||
|
|
||||||
|
# For European keyboards, the / is above 7 so needs Shift pressing.
|
||||||
|
# This comes through as Ctrl-Shift-/ which is mapped to toggleBlockComment.
|
||||||
|
# This doesn't do anything for LaTeX, so remap this to togglecomment to
|
||||||
|
# work for European keyboards as normal.
|
||||||
|
editor.commands.removeCommand "toggleBlockComment"
|
||||||
|
editor.commands.removeCommand "togglecomment"
|
||||||
|
|
||||||
|
editor.commands.addCommand {
|
||||||
|
name: "togglecomment",
|
||||||
|
bindKey: { win: "Ctrl-/|Ctrl-Shift-/", mac: "Command-/|Command-Shift-/" },
|
||||||
|
exec: (editor) -> editor.toggleCommentLines(),
|
||||||
|
multiSelectAction: "forEachLine",
|
||||||
|
scrollIntoView: "selectionPart"
|
||||||
|
}
|
||||||
|
|
||||||
# Trigger search AND replace on CMD+F
|
# Trigger search AND replace on CMD+F
|
||||||
editor.commands.addCommand
|
editor.commands.addCommand
|
||||||
name: "find",
|
name: "find",
|
||||||
|
|
Loading…
Reference in a new issue