SublimeText / CoffeeScript

Syntax highlighting and checking, commands, shortcuts, snippets, watched compilation and more.
440 stars 64 forks source link

Replace add/remove_parens with toggle_parens. #175

Closed markalfred closed 10 years ago

markalfred commented 10 years ago

coffee

With this, parens are removed if your cursor selection is empty, and added if you have a selection. I don't think this is the most intuitive way to toggle. But I'm not sure there's a better way to determine whether arguments are parenthesized or un-parenthesized. The best solution might be to add a syntax-highlight definition that would match function arguments and differentiate between those in parens and those outside of parens. This is beyond my regex abilities currently.

aponxi commented 10 years ago

Thanks!