dabblet icon indicating copy to clipboard operation
dabblet copied to clipboard

adding smart curly bracket features

Open p0o opened this issue 8 years ago • 2 comments

Sublime-like curly brackets with a couple of features:

  • auto complete (add "}" after typing "{")
  • auto indention in new line (use developer's indent unit used in previous lines and if not available uses default indent)
  • nesting support
  • selection support (hit "{" while selecting a text)
  • undo manager support

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.

p0o avatar Aug 07 '15 12:08 p0o

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(){}}".

javatlacati avatar Aug 11 '15 17:08 javatlacati

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.

p0o avatar Aug 11 '15 17:08 p0o