Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
713 views
in Technique[技术] by (71.8m points)

visual studio - VB.NET IntelliSense : Disable newline on ENTER autocomplete

When editing C# code in Visual Studio 2010, the ENTER key makes IntelliSense complete the current suggestion, without adding a new line.

In VB.NET, the default IntelliSense behavior for the ENTER key is to add a new line after completing the current suggestion.

How can I configure IntelliSense to change the VB.NET behavior to the C# one?

I already know that I could press TAB or SPACE, but out of habit I always end up hitting ENTER (and changing line).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

UPDATE VISUAL STUDIO 2017:

Now with Visual Studio 2017 you can change it. Tools -> Options -> Text Editor -> Basic -> IntelliSense. In Enter key behavior select Never add new line on enter

ANSWER FOR VISUAL STUDIO 2015 AND PREVIOUS:

If you want to avoid inserting new line on enter with autocomplete suggestion, just don't press enter. Instead of Enter press Space bar which completes your autofill and just inserts a space.

Or you may use this third party app:

Resharper makes it possible overriding Visual Studio intellisense and using its own intellisense. It is the only way I've found. It has a 30 days free trial if you want to test it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...