Skip to content

Conversation

An-dz
Copy link

@An-dz An-dz commented Aug 8, 2020

This change adds auto-pairing of angle brackets < like it already does with double quotes, parenthesis and square & curly brackets.

The key difference is that it only automatically adds the closing bracket > if you press the opening bracket where it precedes a letter or number. So pressing < after Box will autocomplete to Box<>, but pressing < after a space won't. This way you won't have the closing bracket when trying to write if x < 2.

All other rules of auto-pairing work the same.

I think this is a nice feature when writing generics, traits and pretty much all the stuff we need to put traits or types without messing with the "less than" or "left shift" operands.

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.

1 participant