user3509923
user3509923

Reputation: 33

Sublime Text 3 Opening C files as C++

When I open a file with an ending of ".c" in Sublime Text 3, the program displays it in C++. I know this because the language shown in the bottom right hand corner is "C++". Can I change this?

I don't know if it is related, but when I try to run or build a C program, Sublime Text compiles it using g++ and not gcc. Also, I'm using a linux OS.

Thanks.

Upvotes: 2

Views: 1714

Answers (2)

Utkan Gezer
Utkan Gezer

Reputation: 3069

You can just click on that C++, a menu shall appear in which you can select C.

Since you're saying that all the files with .c extension are being viewed as C++ files, you may also want to change that default by navigating to:

View >> Syntax >> Open all with current extension as... >> C

While having a .c document as the active tab/group/window.

Upvotes: 5

Power Engineering
Power Engineering

Reputation: 722

Sure you can, in the tool bar select Tools->Build System->New Build System... this will allow you to create your custom setting build. After that you can remove Build System from Automatic and set it to your custom Build. Hope it helps.

Upvotes: 1

Related Questions