Reputation: 224
Is there a good possibility to convert Sublime into a simple IDE that allows to edit, compile, link and run C prgograms. Without SublimeClang please, since this is not maintained anymore.
Upvotes: 0
Views: 3234
Reputation: 5189
Please look for bendras.co.uk blog post about Sublime Text 3 as C++ IDE by Paulius Zaliaduonis. You will find more details how to do it.
Here is what you'll need:
All packages should work on most platforms: Windows, Linux, iOS?
Upvotes: 0
Reputation: 102892
Read up on Sublime's build systems and make
. Both are very powerful tools, and allow for a lot of customization. You might need to do a bit of shell scripting to tie everything together into one command, but it's definitely possible, and not that hard, especially if you make good use of the built-in variables. The existing C++ system (available in Packages/C++/C++.sublime-build
) should give you something to start with:
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
}
]
}
Upvotes: 1