Is it possible to configure Sublime Text 2 so that it compiles a code in C and then execute and show the result in the terminal?
Is it possible to configure Sublime Text 2 so that it compiles a code in C and then execute and show the result in the terminal?
Yes, you can configure your build system. I assume you're already familiar with documentation . What you probably lack is how to create a configuration file in Linux. Probably this works:
{
"linux":
{
"cmd": ["cc","-std=c99" ,"$file_name","-o", "${file_base_name}", "-lm", "-Wall", ";", "./${file_base_name}"]
},
"selector" : "source.c",
"shell": true,
"working_dir" : "$file_path",
}
Retired from this answer in the SO .
This may have to be adapted depending on how your installation is.