Skip to content

adding smart curly bracket features - #254

Open
p0o wants to merge 1 commit into
LeaVerou:masterfrom
p0o:smart-curly-bracket
Open

p0o wants to merge 1 commit into
LeaVerou:masterfrom
p0o:smart-curly-bracket

Conversation

@p0o

@p0o p0o commented Aug 7, 2015

Copy link
Copy Markdown

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.

@javatlacati

Copy link
Copy Markdown

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

p0o commented Aug 11, 2015

Copy link
Copy Markdown
Author

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.

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

Successfully merging this pull request may close these issues.

2 participants