Skip to content

Commit

Permalink
add ctrl-alt-[ shortcut for indentAuto
Browse files Browse the repository at this point in the history
and move common cell commands to Cell base config
  • Loading branch information
minrk committed Jan 15, 2016
1 parent a3e074c commit 1c8437a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 9 additions & 3 deletions notebook/static/notebook/js/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,15 @@ define([
readOnly: false,
theme: "default",
extraKeys: {
"Cmd-Right":"goLineRight",
"End":"goLineRight",
"Cmd-Left":"goLineLeft"
"Cmd-Right": "goLineRight",
"End": "goLineRight",
"Cmd-Left": "goLineLeft",
"Tab": "indentMore",
"Shift-Tab" : "indentLess",
"Cmd-Alt-[" : "indentAuto",
"Ctrl-Alt-[" : "indentAuto",
"Cmd-/" : "toggleComment",
"Ctrl-/" : "toggleComment",
}
}
};
Expand Down
4 changes: 0 additions & 4 deletions notebook/static/notebook/js/codecell.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ define([
CodeCell.options_default = {
cm_config : {
extraKeys: {
"Tab" : "indentMore",
"Shift-Tab" : "indentLess",
"Backspace" : "delSpaceToPrevTabStop",
"Cmd-/" : "toggleComment",
"Ctrl-/" : "toggleComment"
},
mode: 'text',
theme: 'ipython',
Expand Down
1 change: 0 additions & 1 deletion notebook/static/notebook/js/textcell.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ define([

TextCell.options_default = {
cm_config : {
extraKeys: {"Tab": "indentMore","Shift-Tab" : "indentLess"},
mode: 'htmlmixed',
lineWrapping : true,
}
Expand Down

0 comments on commit 1c8437a

Please sign in to comment.