roslyn: Pressing Tab key causes unwanted code changes
Please consider this code:
Pressing the Tab key while the cursor is positioned immediately after the Class property results in IDE making this change:
I have removed all the code snippets for C#:
I have chosen to never include snippets:
But the IDE refuses to allow me to insert a tab character after the word Class, and instead performs this nonsensical change resulting in broken code.
Furthermore, copying Tab character from elsewhere in IDE and pasting it after the word Class results in this change:
That’s right, the code is reformatted (which I didn’t ask for) and Tab character is not inserted (which I did ask for).
If at this point I hit Ctrl+Z, the alignment will be restored and the Tab character will appear to the right of the word Class.
Maybe I am missing some additional IDE setting which can disable this madness, but even so this is a seriously f*cked up default behavior and it cannot but remind me of Charles Petzold saying back in 2005 how Ctrl+Z is his most used key in Visual Studio and Word – I am literally spending more time fighting the IDE than coding because of issues like this.
I am observing this problem in Visual Studio 2022 version 17.6.4.
Please fix.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 30 (17 by maintainers)
I don’t think the request itself is unreasonable, but we have to evaluate it the same way we evaluate all the other issues that get filed:
For the old snippet experience, this issue hits a worst-case scenario in our prioritization logic, where all three metrics suggest against making a change. For the new snippet experience, item (3) is less problematic so we might be able to resolve #68985 in the new experience.
@CyrusNajmabadi Just to be perfectly clear, the problems I have with Visual Studio and other Microsoft products are not caused by Microsoft developers working on them — they are caused by bone-headed decisions made by higher-ups who chase some ridiculous metrics for product “improvement”.
Sorry for the offtopic, because what I am about to share is in no way related to Roslyn, this issue, or your team, but I think you guys need to see the latest crazy example of “what were they thinking?” moment I just had in order to better understand my frustration:
Whose “bright” idea was to greenlight this search behavior?!?
Showing those other results == blatant ignoring of my explicitly set search filters — I didn’t ask for “other results” (especially not totally wrong ones!) just for the sake of having a full page of results.
This is not Bing web search where returning just a couple of (or not returning any) results might turn people away and make them use another search engine! This is a professional product aimed at developers who by definition should know what they are doing and be exact and concise. Why are the search filters there if they aren’t respected? Doesn’t the person who greenlighted this know that the most cardinal sin any application can commit is to allow and then ignore user input?
You may think I am overreacting, but frankly I find this behavior condescending, insulting, and disruptive in the same manner as the IDE “correcting” what I typed, or Google / Bing showing me results that aren’t relevant at all for the keywords I entered.
Every day there’s more of this “user engagement at all costs” in every product and service, and it makes me not want to use them at all, let alone contribute to their development.
The real problem is the internal corporate culture in large companies which seems to be tuned to maximize shareholder profits through customer engagement which allows this engagement plague to spread, and I don’t see that changing anytime soon. If it continues unabated, developers will soon be more productive using Notepad and
cscfrom the command line, at least until those tools also get the same treatment.Sorry for the rant, and have a good weekend.