resolve conflict
This commit is contained in:
@ -17,9 +17,21 @@ editor.setSize("100%", "auto");
|
||||
|
||||
// Hijack tab key to enter two spaces intead
|
||||
editor.setOption("extraKeys", {
|
||||
Tab: function(mc) {
|
||||
var spaces = Array(mc.getOption("indentUnit") + 1).join(" ");
|
||||
mc.replaceSelection(spaces);
|
||||
Tab: function(cm) {
|
||||
if (cm.somethingSelected()){
|
||||
cm.indentSelection("add");
|
||||
} else {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
},
|
||||
"Shift-Tab": function(cm) {
|
||||
if (cm.somethingSelected()){
|
||||
cm.indentSelection("subtract");
|
||||
} else {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
@ -22,10 +22,23 @@ var editor = myCodeMirror;
|
||||
// Hijack tab key to insert two spaces instead
|
||||
editor.setOption("extraKeys", {
|
||||
Tab: function(cm) {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
if (cm.somethingSelected()){
|
||||
cm.indentSelection("add");
|
||||
} else {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
},
|
||||
"Shift-Tab": function(cm) {
|
||||
if (cm.somethingSelected()){
|
||||
cm.indentSelection("subtract");
|
||||
} else {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
},
|
||||
"Ctrl-Enter": function() {
|
||||
bonfireExecute();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -18,8 +18,20 @@ editor.setSize("100%", "auto");
|
||||
// Hijack tab key to enter two spaces intead
|
||||
editor.setOption("extraKeys", {
|
||||
Tab: function(cm) {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
if (cm.somethingSelected()){
|
||||
cm.indentSelection("add");
|
||||
} else {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
},
|
||||
"Shift-Tab": function(cm) {
|
||||
if (cm.somethingSelected()){
|
||||
cm.indentSelection("subtract");
|
||||
} else {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
},
|
||||
"Ctrl-Enter": function() {
|
||||
bonfireExecute();
|
||||
|
@ -10,7 +10,7 @@ meta(name='twitter:widgets:csp', content='on')
|
||||
meta(name='p:domain_verify', content='d0bc047a482c03c24f1168004c2a216a')
|
||||
meta(property="og:url", content="http://www.freecodecamp.com")
|
||||
meta(property="og:description", content="Free Code Camp is a community of busy people who learn to code by collaborating on projects for nonprofits. Build your full stack JavaScript Portfolio today.")
|
||||
meta(property="og:image", content="https://pbs.twimg.com/profile_images/522961310212833280/XE6vGAaO.jpeg")
|
||||
meta(property="og:image", content="https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png")
|
||||
meta(property="og:type", content="article")
|
||||
meta(property="article:publisher", content="https://www.facebook.com/freecodecamp")
|
||||
meta(property="article:section", content="Responsive")
|
||||
|
Reference in New Issue
Block a user