Add smart braces functionality for CodeMirror: - When a "(" typed, a pair of "()" should be inserted - When a ")" is typed and cursor is before a closing matched ")", nothing should be inserted, but the cursor should skip the brace - When a backspace is hit between brace pair "(|)", both braces should be deleted. Same should work for curly braces.
Created attachment 192717 [details] Patch
Comment on attachment 192717 [details] Patch Looks like there's a better way to do this.
Created attachment 192733 [details] Patch
Comment on attachment 192733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192733&action=review > Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js:68 > + this._smartBracesController = new WebInspector.CodeMirrorTextEditor.SmartBracesController(this._codeMirror); Please move this behind a setting > Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js:515 > + if (WebInspector.TextUtils.isWordChar(char) || (!WebInspector.TextUtils.isBraceChar(char) && WebInspector.TextUtils.isStopChar(char))) if (!whitespace && !clsoingBrace) ?
Created attachment 193532 [details] Patch
Comment on attachment 193532 [details] Patch Clearing flags on attachment: 193532 Committed r146188: <http://trac.webkit.org/changeset/146188>
All reviewed patches have been landed. Closing bug.