Reputation: 4328
In VS 2019 when intellisense comes up and I select an option by pressing enter a new line is created and I have to constantly backspace to get back to the line I was just on. This is a change from all previous VS versions. I changed the option (Tools -> Options -> Text Editor -> All Languages -> Intellisense -> Enter key behavior -> to "Never add a new line on enter" but its still adding a new line.
How do I fix this?
Upvotes: 3
Views: 1513
Reputation: 545
TL;DR the issue is most likely the keyboard developing key doubling on the enter key! Tends to happen on mechanical keyboards especially those with the logitech G switches.
At first I also thought this to be an intellisense issue. But none of my co workers hat that issue. So I searched for a while then gave up and tried to ignore it.
A few weeks later one of my co workers also got the same issues and mine were gone.
The reason for the issue was key doubling on the enter key. When pressed not fast but a little slower it tended to register two or three keypresses at once. You can try it out if you go into notepad and press enter once, but slowly (still not so slow as to trigger the auto repeat). You should see only one newline apearing. Not two or three at once. Just ONE newline.
After I exchanged my keyboard for that of my co worker, the issue was gone for me and by some chance he now seems to have that intellisense bug. Its a mystery.
Upvotes: 0
Reputation: 286
Go to Tools -> Options -> Text Editor -> C# -> Code Style -> Formatting-> New Lines
Here there are a lot of options. Remove the check on all options here to never put the open bracket on a new line.
Upvotes: 1