Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger event on electric char #3188

Closed
marcelgerber opened this issue Apr 8, 2015 · 1 comment
Closed

Trigger event on electric char #3188

marcelgerber opened this issue Apr 8, 2015 · 1 comment

Comments

@marcelgerber
Copy link
Contributor

In Brackets, we'd love to react to electric chars in order to remove possible trailing whitespace (for more background, see adobe/brackets#8395 and [the code that currently handles the common chars ]{})](https://github.com/adobe/brackets/blob/97ed87bb8597a859c3fd3def860cc1a97d1bb4bf/src/editor/Editor.js#L436-L454)), but unfortunately, there's no way to do so right now.
I suggest CodeMirror should fire an event (like electricCharIndent) in such cases. Any objections?

@marijnh
Copy link
Member

marijnh commented Apr 10, 2015

Sounds useful. Implemented in attached patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants