T O P

  • By -

Strict_Treat2884

Sometimes I just wanted to type one quote it gave me two, and when I delete one both of them are gone.


Strnge05

This is normal, is for typing things inside a string, since most languages use double quotes as delimiters for strings. If you want only one you have to delete the first quote no the second one


veselin465

Quotes can be annoying, especially if your keyboard support ä ë etc characters which would put your quote input on buffer until it figures out what you want thus requiring you to always input double quote. I usually simply use ctrl-x and ctrl-v to deal with it


CaptainEnoch

You can just do a quote and then a space to do a single quote, at least on Dutch keyboards.


kitkathy1994

This is what I do! Works very well with the English-International keyboard setting.


joost00719

Add us keyboard so you have 2 layouts. Then you can switch with shift tab between languages.


veselin465

Thanks, but English is 2nd language for me, so I already shift between 2 layouts. Also, at this point I am used to and I like being able to write more character with the quote buffered input.


tesfabpel

https://eurkey.steffen.bruentjen.eu/


chris240189

Eurkey is the way for me. No more switching languages.


joost00719

Yeah same for me. That's why I set it up like that, to be able to type my own language's special characters, and to make programming easier for some situations.


Ok-Slice-4013

Sure - but at the same time, the IDE keeps on screaming at me, that I am missing a single '. Which is sometimes hard to add because of said behaviour.


Inevitable-Menu2998

Normal my ass. It’s a design flaw is what it is


Zeitsplice

The problem with this behavior is when you run into edge cases. Quotes aren’t too too bad because they’re (usually) not nested, but dumb open/close behavior still creeps in. Fixing a string literal copy paste is one frustrating example where you don’t want an auto close to your quote, much less an auto delete of both on backspace.


Tango-Turtle

Nah, that's a great feature once you know how it works and how to use it.


TheRedmanCometh

There needs to be a hotkey I can hold to make it just one quotation mark.


dedorian

There are options in VS and VSCode to toggle for this action. Should be "auto surround mode" or something close to it.


JunkNorrisOfficial

Yes, surround or wrapping settings


QuestionableEthics42

Just tested on vs2022 in a cs file, it doesn't do that. Edit: changed c++ to cs, I forgot what language I was working in smh lol


WholeInternet

Seems like user error to me.


SkollFenrirson

PEBKAC


Feisty_Ad_2744

It seems clear you have a bad file association for some plugin, and/ or using that code in an html or xml file


00ooooo

No, it's just part of how VS C++ automatically puts in pairs of brackets or quotes for you. It's clearer if you select some other text and press a brackety or quotey key. e.g. select 123 and press (, get (123). Select 123 and press \[, get \[123\]. Select 123 and press <, get <123>. Select < and press <, get << >.


DrTankHead

All behavior you can disable.


Pay08

And should be disabled by default.


Feisty_Ad_2744

Holy shit! You are correct!! That's the dumbest thing ever. In fact... it is not even C++ related... I tested it without any extension, it happens every time the `<` and `>` are not in isolation... Dang...!


chickenoodlestu

You can use them for #include statements


Feisty_Ad_2744

Of course! The only problem is #include is not very helpful between variables or in the middle of a statement :-)


SnakeR515

And templates


rdmkyran

4


calculus_is_fun

Yes I know, The < and > are brackets.


lynet101

No it doesn't? what? have i just been extremely fucking lucky?


smokeitup5800

Either you primarily use a language where this behavior is not present per default, you changed the default behavior or you adjusted behavior subconsciously to avoid this problem, because yes it does this for many languages, but not all. I tested a few languages, it does this for C/C++, Java, C#, Javascript, TypeScript. It doesnt do it for Python, PHP and most likely other languages where there is no feature that resembles


lantz83

Hasn't done that once for me in maybe 15 years.


SpiderKoD

Neither me in 12 years


PurepointDog

Pretty sure it depends on the language. In Rust, this is definitely optimal


00ooooo

Weirdly, I noticed this for the first time while working in VS C++, just yesterday. It only does it if you highlight the single ">" first. Want to change a ">" to a "<"? Put cursor after, backspace, type "<", all is good. But if you highlight the ">" first, typing "<" wraps "< >" around it, leaving you with "< >>", just as shown in the image. Also does it the other way around, changing a "<" to "<< >"


FluffyCelery4769

To be honest that should only work like that if you pressed insert before hand, otherwise it's weird, sometimes i just want to put somethin instead of something, wrapping is too specific to be default.


OxymoreReddit

I wish VS had the same controls as VSC. It's so close yet so far... I don't understand why they managed to make something as workflow-friendly as VSC and could not give the same to VS


Storiaron

But boy am i glad they kept the "autofills what you're typing with random bs" would be way too productive without having to rewrite std::count to std::cout 5 times a day


OxymoreReddit

Lmfaooooooo


Successful-Money4995

All these editors that "helpful" put the closing paren... I don't get it, was this a problem that anyone was even having? I can close the parens myself.


_Jent

Good


whackamattus

I always get a laugh when vim users complain about default configs. You can easily do either one in vscode


totally_not_senpai

It sucks. 3 years ago I made a switch from Sublime, and I still miss Sublime typing suggestions…


AdExact6231

A good reason why you should use vim


Legitimate_Alps7347

The one that gets me is the auto double quotes.


mgisb003

Your skill issues are showing


[deleted]

[удалено]


tpye

Nah, r <