C
C#13mo ago
Pixel-ink

❔ What is this and How do I shut it off

What is this red squares stuff. It gets in my way. Can I shut it off??
19 Replies
Angius
Angius13mo ago
Looks like either Copilot or IntelliSense wants to show you a better way to write this string I'd just accept the changes
Pixel-ink
Pixel-ink13mo ago
The problem is, I'm not done and I can't see what I am trying to edit. How do I turn it off?
daysleeper
daysleeper13mo ago
Tools -> Options -> Intellicode googlee said but i wouldnt recommend turning it off completely
Pixel-ink
Pixel-ink13mo ago
Whose bright idea was this. All I am trying to do is delete lines but I can't dsee my highlighting or where my cursor is. I check out the options. But, this is BAD UX experience.
Angius
Angius13mo ago
Accept the suggestion, then delete the lines ¯\_(ツ)_/¯ There's no reason to have all that concatenation anyway
Pixel-ink
Pixel-ink13mo ago
I do it for readability so it don't scroll all the way to the right. Its a long line
cap5lut
cap5lut13mo ago
its probably suggesting raw string literal here (https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/raw-string-literal) which would add a lot more readability if u apply it
Pixel-ink
Pixel-ink13mo ago
Unchecking Intellisdense works, but, that means I have to tuen this on and iff when I need to edit a list like this.
Angius
Angius13mo ago
txtCode.Text = """
SUPPORTED FORMATS
*.ascii
*.bat
*.class
*.cs
...
""";
txtCode.Text = """
SUPPORTED FORMATS
*.ascii
*.bat
*.class
*.cs
...
""";
Assuming you're not stuck on some old version of .NET
Pixel-ink
Pixel-ink13mo ago
VS 2022 .net 4.8
Angius
Angius13mo ago
oof
cap5lut
cap5lut13mo ago
its a language feature, i think that should be possible there as well (and a "simple" one at that so there shouldnt be a need for some polyfill package)
reflectronic
reflectronic13mo ago
...just press escape?
cap5lut
cap5lut13mo ago
wouldnt it just re-suggest it after some minor modification?
Pixel-ink
Pixel-ink13mo ago
Did that, but it just happens again if I try to edit it. Turning off options works, but after I am done I have to turn it back on. What a pain. VB doesn't do this. I get version error with this. Do just using "enter" key for new lines doesn't work with my version
cap5lut
cap5lut13mo ago
in ur csproj file u probably have to bump the language version <LangVersion>11</LangVersion> needs to be in there somewhere
Pixel-ink
Pixel-ink13mo ago
Thanks for every ones help... I changed the version and all looks much better.
cap5lut
cap5lut13mo ago
there is just one thing i do not know about/didnt check yet: what is used for the line break, CRLF or LF is usually it, my assumption is that its using the what ever ur file uses its clearly not something at runtime as it has to be in there at compile time
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.