Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An easy way to build and run inside SublimeText2. This method uses makefile with appropriate rules. A simple makefile is also provided just as an example. To use this copy `Unleash Makefile.sublime-build` into `Packages\User` directory of your SublimeText config directory. Keybindings also can be added to User keybindings.
[
{"keys": ["ctrl+shift+c"], "command": "exec", "args": {"kill": true} } ,
{"keys": ["ctrl+shift+l"], "command": "build", "args": {"variant": "Clean"} }
]
all: *.h main.cpp
g++ main.cpp -o main
clean:
rm main
run:
./main
{
"cmd": ["make"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${project_path}",
"variants":
[
{
"name": "Run",
"cmd": ["make","run"]
},
{
"name":"Clean",
"cmd":["make","clean"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment