add commenting/uncommenting, add sublime text bindings
This commit is contained in:
parent
979fcf2152
commit
5362098844
1 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,8 @@ import 'codemirror/addon/lint/lint';
|
||||||
import 'codemirror/addon/lint/javascript-lint';
|
import 'codemirror/addon/lint/javascript-lint';
|
||||||
import 'codemirror/addon/lint/css-lint';
|
import 'codemirror/addon/lint/css-lint';
|
||||||
import 'codemirror/addon/lint/html-lint';
|
import 'codemirror/addon/lint/html-lint';
|
||||||
|
import 'codemirror/addon/comment/comment';
|
||||||
|
import 'codemirror/keymap/sublime';
|
||||||
import { JSHINT } from 'jshint';
|
import { JSHINT } from 'jshint';
|
||||||
window.JSHINT = JSHINT;
|
window.JSHINT = JSHINT;
|
||||||
import { CSSLint } from 'csslint';
|
import { CSSLint } from 'csslint';
|
||||||
|
@ -29,7 +31,8 @@ class Editor extends React.Component {
|
||||||
mode: 'javascript',
|
mode: 'javascript',
|
||||||
lineWrapping: true,
|
lineWrapping: true,
|
||||||
gutters: ['CodeMirror-lint-markers'],
|
gutters: ['CodeMirror-lint-markers'],
|
||||||
lint: true
|
lint: true,
|
||||||
|
keyMap: 'sublime'
|
||||||
});
|
});
|
||||||
this._cm.on('change', debounce(200, () => {
|
this._cm.on('change', debounce(200, () => {
|
||||||
this.props.updateFileContent(this.props.file.name, this._cm.getValue());
|
this.props.updateFileContent(this.props.file.name, this._cm.getValue());
|
||||||
|
|
Loading…
Reference in a new issue