oldkrak
oldkrak

Reputation: 47

How to change Visual Studio Code's autocomplete to be the same as Visual Studio Community's?

Is there a setting that automatically inserts whitespaces into the code when you enter a semicolon?

For example,

cout<<"Hello world!"<<endl

to

cout << "Hello world!" << endl;

enter image description here

enter image description here

If you type ; in Visual Studio (as seen above), it will automatically insert whitespaces. Is there a setting similar to this in VS Code?

Upvotes: 0

Views: 1610

Answers (1)

JMVR
JMVR

Reputation: 94

In Settings, under Text Editor is "Formatting". In here, turn on "Format On Type". This will cause it to auto-format after putting in a semicolon.

If it still doesn't format it after this, you'll probably have to go under Extensions to your language (which in this case is C/C++), scroll down until you see C_Cpp > Vc Format, and change any formatting you want.

Upvotes: 4

Related Questions