Open TetraTheta opened 10 months ago
How about turn off "Auto complete braces and quotes" for [ ]
?
I think 'turning auto-complete off' is a different thing. That is a 'workaround' (and also what I configured for now).
VS Code does auto-complete ]
when user inputs [
, but it does not add additional ]
when user inputs ]
when cursor is in front of ]
, unless in some exceptions.
I will add few more example GIFs later for better understanding.
EDIT:
I added another example GIF at the first post. It turned out that I misunderstood how VS Code handles closing brackets depending on location of cursor.
I don't know how exactly VS Code handles closing brackets as code-wise, but for me, their approach is most 'pleasing' way of handling closing brackets.
In VS Code, if you type
[
and]
, it will be[]
. But in Notepad2, it will be[]]
because of duplicated closing brackets.In VS Code:![VS Code](https://github.com/zufuliu/notepad2/assets/37061801/c33af2f8-5c50-4bcc-bcfd-4003538609dd)
In Notepad2:![Notepad2](https://github.com/zufuliu/notepad2/assets/37061801/58f7c047-48be-4d74-8010-3e370327cbb8)
I think when user types closing bracket, if next column character is exactly what the user typed, it should be 'ignored' and move on to next column, like VS Code.
But if user explicitly moved to the location via Mouse Click or using Arrow Keys(↑
,←
,↓
,→
), the character should be typed, so becoming something like[]]
.I misunderstood how VS Code handles closing brackets.
[here are some words]
normally.]
and typed]
.]
with Mouse, and typed]
.]
with Arrow Key and go back in front of]
and typed]
.]
with Mouse and go back in front of]
and typed]
.So, once the cursur has located after closing bracket, VS Code will disable 'smart closing bracket'-thing and just input
]
as user typed.But people might like current behavior which makes
[]]
, so I want an option for toggling the bahavior of handling closing brackets between old and new.Sorry if this is already implemented. I couldn't find such configuration in Auto Completion setting.