LeaVerou / dabblet

An interactive CSS playground
http://dabblet.com
817 stars 148 forks source link

adding smart curly bracket features #254

Open p0o opened 9 years ago

p0o commented 9 years ago

Sublime-like curly brackets with a couple of features:

I know this repo is not active but I loved this product and I'm used to this feature in Sublime so I wish to have it here in Dabblet too.

javatlacati commented 9 years ago

just in case... auto add "}" after typing "{" can be conditional?

I hate when correcting a typho and the editor creates an extra bracket like "hello()}" -> "hello(){}" ->auto add occurs here->"hello(){}}".

p0o commented 9 years ago

Yes it's conditional. It will only add "}" when you are typing "{" as the last character in the line. E.g if you correct something here:

someCode('Hello', true, 2, function() { return true; });

Nothing weird happens.