Commit 430ee10f authored by Franco Pariani's avatar Franco Pariani
Browse files

Comment/Uncomment shortcut

parent d8a72b01
......@@ -51,7 +51,7 @@
var re_digits = new RegExp(/^\d+$/, "g");
// not word = 'Enter'
// press 'Enter'
if (options.key == 'Enter'){
var previous_line = editor.getLine(cur.line - 1);
var re_funs = new RegExp(FUNS.source, "g"), match;
......@@ -79,6 +79,7 @@
var re_w_s = new RegExp(WRITING_SET.source, "g");
var re_w_c = new RegExp(WRITING_COMMENT.source, "g");
// no typing sets or comments
if (!re_w_s.exec(previous_part) && !re_w_c.exec(previous_part)){
// sets
var re_dom = new RegExp(DOM.source, "g");
......
......@@ -119,8 +119,8 @@
</div>
</div>
</ng-template>
<ng-template #shortcutsPopoverContent style="width: 15em">
<div style="width: 15em">
<ng-template #shortcutsPopoverContent style="width: 18em">
<div style="width: 18em">
<div class="form-group">
<label><b>Ctrl+P</b> {{ "i18n.shortcuts.runCode" | translate }}</label>
<label><b>Ctrl+A</b> {{ "i18n.shortcuts.newFile" | translate }}</label>
......@@ -129,6 +129,7 @@
<label><b>Ctrl+R</b> {{ "i18n.shortcuts.restartInterpreter" | translate }}</label>
<label><b>Ctrl+G</b> {{ "i18n.shortcuts.saveFile" | translate }}</label>
<label><b>Ctrl+{{ "i18n.shortcuts.space" | translate }}</b> {{ "i18n.shortcuts.autocomplete" | translate }}</label>
<label><b>Ctrl+Shift+K</b> {{ "i18n.shortcuts.comment" | translate }}</label>
</div>
</div>
</ng-template>
......
......@@ -127,7 +127,8 @@
"restartInterpreter" : "Restart interpreter",
"saveFile" : "Save File",
"autocomplete" : "Autocomplete",
"space" : "Space"
"space" : "Space",
"comment" : "Comment/Uncomment"
}
}
}
......@@ -127,7 +127,8 @@
"restartInterpreter" : "Reiniciar intérprete",
"saveFile" : "Guardar archivo",
"autocomplete" : "Autocompletar",
"space" : "Espacio"
"space" : "Espacio",
"comment" : "Comentar/Descomentar"
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment