Estoy intentando efectuar un archivo de configuración para Sublime Text, el problema es que quiero al presionar F8 compilar y al presionar F5 ejecutar el programa.
Estos son mis archivos de configuración, cuando intento compilar no funciona, me dice no build system with variant compile
, pero cuando presiono F5 compila y ejecuta.
build.sublime-build
{
"cmd": ["g++", "-std=c++17", "-Wshadow", "-Wall", "-o", "${file_path}/${file_base_name}.exe", "$file", "-O2", "-Wno-unused-result"],
"working_dir": "${file_path}",
"selector": "source.cpp",
"variants":
[
{
"name": "Compile",
"cmd": ["g++", "-std=c++17", "-Wshadow", "-Wall", "-o", "${file_path}/${file_base_name}.exe", "$file", "-O2", "-Wno-unused-result"]
},
{
"name": "Run",
"cmd": ["start", "cmd", "/k", "${file_path}/${file_base_name}.exe"],
"shell": true
}
]
}
default.sublime-keymap
[
{
"keys": ["f8"],
"command": "build",
"args": {
"variant": "Compile"
}
},
{
"keys": ["f5"],
"command": "build",
"args": {
"variant": "Run"
}
}
]