Closed Bug 678980 Opened 13 years ago Closed 11 years ago

Source Editor should automatically append closing characters

Categories

(DevTools :: Source Editor, enhancement, P4)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cedricv, Unassigned)

Details

(Whiteboard: [sourceeditor][orion])

Auto-closing pairs should probably be defined by the mode (JS, CSS, ...) For both JS and CSS though following should work : "{" + "}" "[" + "]" "(" + ")" "/*" + "*/" There should probably be a pref to disable it.
This is *probably* going to be upstreamed to Orion.
This should definitely be handled by Orion. I'll also note that this is low priority.
(In reply to Kevin Dangoor from comment #2) > This should definitely be handled by Orion. I'll also note that this is low > priority. Low priority but also low hanging fruit? This is reasonably simple to implement (at least initially on textarea implementation and/or SourceEditor level), and it really improves *a lot* Style Editor's UX (flicker becomes more an exception than a rule)
I mean my rationale for opening this bug is not about the 'debatable' comfort given by the future wrt to typing (faster), but a huge change in regard to updating stylesheets real-time with much less flicker in most simple situations (before incremental parser stuff that allow the same experience in all situations AND with this feature preffed off if the user prefers so)
Whiteboard: [sourceeditor][orion]
Severity: normal → enhancement
Version: unspecified → Trunk
Blocks: 713612
No longer blocks: 713612
This is most-likely going to be implemented upstream in Orion. We should wait for that.
Priority: -- → P4
Moving to Source Editor component. Filter on CHELICERAE.
Component: Developer Tools → Developer Tools: Source Editor
This is implemented now.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
It looks like it is implemented in the style editor, but I don't see it in the scratchpad nor in the shader editor. Do we have separate bugs for these or should this be reopened?
Flags: needinfo?(anton)
There's an option for that, autoCloseBrackets. Other components can enable it the same way StyleSheetEditor.jsm did: let editor = new Editor({ value: "...", ... autoCloseBrackets: "{}()[]" });
Flags: needinfo?(anton)
Also, there's a talk about enabling this addon by default in bug 940713.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.