Skip to content

Commit 1c8437a

Browse files
committed
add ctrl-alt-[ shortcut for indentAuto
and move common cell commands to Cell base config
1 parent a3e074c commit 1c8437a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

notebook/static/notebook/js/cell.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,15 @@ define([
114114
readOnly: false,
115115
theme: "default",
116116
extraKeys: {
117-
"Cmd-Right":"goLineRight",
118-
"End":"goLineRight",
119-
"Cmd-Left":"goLineLeft"
117+
"Cmd-Right": "goLineRight",
118+
"End": "goLineRight",
119+
"Cmd-Left": "goLineLeft",
120+
"Tab": "indentMore",
121+
"Shift-Tab" : "indentLess",
122+
"Cmd-Alt-[" : "indentAuto",
123+
"Ctrl-Alt-[" : "indentAuto",
124+
"Cmd-/" : "toggleComment",
125+
"Ctrl-/" : "toggleComment",
120126
}
121127
}
122128
};

notebook/static/notebook/js/codecell.js

-4
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,7 @@ define([
125125
CodeCell.options_default = {
126126
cm_config : {
127127
extraKeys: {
128-
"Tab" : "indentMore",
129-
"Shift-Tab" : "indentLess",
130128
"Backspace" : "delSpaceToPrevTabStop",
131-
"Cmd-/" : "toggleComment",
132-
"Ctrl-/" : "toggleComment"
133129
},
134130
mode: 'text',
135131
theme: 'ipython',

notebook/static/notebook/js/textcell.js

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ define([
7070

7171
TextCell.options_default = {
7272
cm_config : {
73-
extraKeys: {"Tab": "indentMore","Shift-Tab" : "indentLess"},
7473
mode: 'htmlmixed',
7574
lineWrapping : true,
7675
}

0 commit comments

Comments
 (0)