Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@melmi
Created May 19, 2013 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melmi/5609267 to your computer and use it in GitHub Desktop.
Save melmi/5609267 to your computer and use it in GitHub Desktop.
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