How to stop atom from auto closing and swallowing braces and quotes


#1

I really don’t like my editor trying to be smart about what I type. I find automatically closing of braces counterintuitive and because of that I lose more time correcting its errors than it saves me time. The same goes for swallowing the typing of a closing brace when already in front of one (same for quotes). Basically I want the editor to type exactly what I press on my keyboard. I really feel this behaviour should be part of an extension instead of being standard. I couldn’t find a way to turn this feature off and there also doesn’t seem to be an extension causing this. Disabling match-braces didn’t solve it for me. This exact issue frustrated me as much in Sublime but there I was able to disable it in some way. I do think though that creating an extension or keybindings to disable it is the wrong way around.


How to disable auto insertion of matching quotation marks?
#2

Yeah, I couldn’t find a way to disable it either. And I have some troubles with this behavior in my keyboard layout:


#3

I’m surprised this wasn’t done in a package as feature, but in the core. Sublime Text allows us to disable it, why not here as well?


#4

I have the same trouble, as well as with the autopairing of quotes. I tend to go back and edit things after an initial pass of writing them out, so if I’m editing the quotes or brackets used I end up having to wrestle with them to actually get what I want.


#5

So… no replies after all?


#6

+1 need to disable…


#7

You can disable the Bracket Matcher package. This will also disable highlighting and jumping between matching brackets as well.


#8

I’d like to disable autoclosing of quotes and parentheses without losing the ability to match existing pairs.


#9

That’s great. Pity that we lose highlighting. Apparently you have to restart atom after disabling this package to make it work.


#10

I’ve disabled bracket-matcher and manually re-enabled just the syntax highlighting.
Basically bracket-macther-view does the highlighting completely autonomously from bracket-matcher.coffee.

By disabling the package and only re-enabling the highlighting we get the functionality we expect (have to manually add the css).

If I could work out how to manage package configuration then this is simply an if statement to return early within bracket-matcher.

BracketMatcherView = require '/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js'

atom.workspaceView.eachEditorView (editorView) =>
    if editorView.attached and editorView.getPane()?
        sheet = ( ->
            style = document.createElement "style"
            style.appendChild document.createTextNode("")
            document.head.appendChild style
            return style.sheet
        )()

        sheet.addRule '.bracket-matcher', 'border-bottom: 1px dotted lime; position: absolute;', 0

        new BracketMatcherView(editorView)

full gist available here:
gist.github.com/abovethewater/9505609


#11

Even better, use styles.less

~/.atom/init.coffee

BracketMatcherView = require '/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js'

atom.workspaceView.eachEditorView (editorView) =>
    if editorView.attached and editorView.getPane()?
        new BracketMatcherView(editorView)

~/.atom/styles.less

.bracket-matcher {
    border-bottom: 1px dotted lime;
    position: absolute;
}

Useful for customising the highlight colour too.

gist updated


#12

Yeah, It would be great if the package allowed you to toggle which features you want.


#13

no solution?
i crazy here! rs


#14

I’d like to add in my 2 cents here:

I’ve manually disabled this auto-completion multiple times but Atom continues to restore the behavior automatically. I personally do not use features like this as they ultimately cause more trouble in my workflow than they save but I understand that people enjoy it. I think it’d be awesome if you would add configuration options to disable the auto matching feature for those of use who do not wish for this behavior.

After using Atom in my daily workflow I’ve been mostly happy with it aside from the constant restoration of the auto matching after I’ve explicitly disabled it. This is my only complaint thus far with the software so keep up the good work and think about making this feature and more configurable - after all it, isn’t Atom supposed to have that stance where all it does is edit text at it’s core and is completely customizable on top of that? Where is the customization?

Keep up the good work guys.


#15

I’ve created a pull request for this to atom/bracket-matcher: https://github.com/atom/bracket-matcher/pull/27


#16

I like (and need) bracket highlighting.

So how do I configure Atom to NOT insert a 2nd quote when I type only one? I’m not seeing anything in the settings.

Even worse, you try to delete the 2nd, and it removes both of them, unless you take it out from the right side.


#17

Looks like it is in the Bracket Matcher settings:


#18

In version 1.62.0 the Autocomplete Brackets setting rules both brackets and quotes, while Autocomplete Smart Quotes has no apparent effect.
It would also be useful to have separate language settings here - i.e. no signle quote completion for lisps.


#19

If you have a repro case, please file a bug on the bracket-matcher package.


#20

I know this is an old thread, but this has been solved. Bracket matcher now gives the option to choose which characters are autocompleted.