Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Please include an option to not complete any quotes #171

Closed
ghost opened this issue Aug 21, 2015 · 13 comments
Closed

Please include an option to not complete any quotes #171

ghost opened this issue Aug 21, 2015 · 13 comments

Comments

@ghost
Copy link

ghost commented Aug 21, 2015

I find the quote matching annoying (mainly because it doesn't work right -- I constantly get double quotes all over the place which doesn't happen in ST3).

Until/if it's fixed, I would like to just disable it without disabling the other features of this package.

@ghost ghost changed the title Please include an option to not complete _any_ quotes Please include an option to not complete any quotes Aug 21, 2015
@richard-uk1
Copy link

I believe this is already possible in the settings for the module.

@notslang
Copy link

I find the quote matching annoying, mainly because it doesn't work right

@zyklus: What isn't working right with it? Could you do a screen recording, or write out an explanation or something?

@derekdreery: Nah, that's just for smart quotes, it sounds like @zyklus wants to disable all quotes.

@leovailati
Copy link

+1
Some programming languages (I can mention lisps, rust and MATLAB) have syntax for single quote marks, e.g. '(a b c), &'static str, Type<'a>, matrix'. It is annoying when the second tick is automatically inserted when it shouldn't be. However, it is still very convenient to have double quote marks and brackets completed. It would be nice to have an option to avoid the automatic completion of single quotes, or quotes in general.

The ideal solution, IMO, would be a text field in the module settings in which the user can specify the pairs they want to have autocompleted. Something like Default: () [] {} "" || “” ‘’ «» ‹› ''.

Note: I think #182 would be cool, but maybe a little too much for a bracket matcher feature.

@novelistparty
Copy link

+1 for @leovailati solution. Fine-grained control would be nice.

@jacquescrocker
Copy link

+1 for @leovailati solution as well. single quote is also valid syntax for starting a line on slim (templating language)

@ts-web
Copy link

ts-web commented Dec 18, 2015

+1

The behavior is a bit over-eager sometimes. Example:
in JS, try to replace a " with an '. Highlight the ", press ', see the result: '"'. Syntax highlighting temporarily messed up. Press Delete twice to delete the two extra characters. Repeat for opposite quote mark.

@aatkinson-canopy
Copy link

Bracket Matcher should not insert a set of brackets when the cursor is to the left of a string. This already the case for when the cursor is to the right of a string. It should insert the set of quotes only when the cursor is not adjacent to a string. Thanks.

@boozedog
Copy link

boozedog commented Apr 5, 2016

+1 for disabling (non-smart) quotes separately from brackets. I'm finding myself stumbling over the non-smart-quote behavior a lot in Javascript. Brackets are fine though.

@notslang
Copy link

I think this issue can be closed since #182 sounds like exactly what is needed, especially now that we have more general support for per-language/scoped settings.

@z00m1n
Copy link

z00m1n commented Jul 12, 2016

+1

@utkarshkukreti
Copy link

This was very annoying when wanting to type a single single quote in Rust so I dug into the source and removed completion of single quotes from everywhere. Here are the steps, in case it helps anyone:

  1. Run apm develop bracket-matcher

  2. Open lib/bracket-matcher.coffee and comment out the pairs you want to disable, e.g. I did:

    diff --git a/lib/bracket-matcher.coffee b/lib/bracket-matcher.coffee
    index 7326026..915aa6e 100644
    --- a/lib/bracket-matcher.coffee
    +++ b/lib/bracket-matcher.coffee
    @@ -14,7 +14,7 @@ class BracketMatcher
         '[': ']'
         '{': '}'
         '"': '"'
    -    "'": "'"
    +    # "'": "'"
         '`': '`'
  3. Close Atom and start it using atom -d to enable development mode so that it loads this development package.

@acicali
Copy link

acicali commented Aug 25, 2016

Just wanted to add two cents...

I appreciate the auto completion of quotes most of the time - especially when writing something brand new. There are other times when I'm modifying existing code and this same autocompletion feature is a nuisance, requiring me to "right arrow -> backspace/delete" very often. Disabling the feature in settings means I have to lose the "pro" to get rid of the "con".

It might be better if this behavior could simply be disabled per keystroke using a modifier key (fn or something, maybe customizable).

@winstliu
Copy link
Contributor

winstliu commented Dec 6, 2016

Fixed by #249.

@winstliu winstliu closed this as completed Dec 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests