We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 041d30e commit c133fccCopy full SHA for c133fcc
src/app/components/sandbox/CodeEditor/index.js
@@ -237,6 +237,15 @@ export default class CodeEditor extends React.PureComponent {
237
'Ctrl-.': cm => {
238
if (this.server) this.server.selectName(cm);
239
},
240
+ Tab: cm => {
241
+ // Indent, or place 2 spaces
242
+ if (cm.somethingSelected()) {
243
+ cm.indentSelection('add');
244
+ } else {
245
+ const spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
246
+ cm.replaceSelection(spaces, 'end', '+input');
247
+ }
248
+ },
249
...defaultKeys,
250
});
251
} else {
0 commit comments