Skip to content

Instantly share code, notes, and snippets.

@nktstudios
Created April 22, 2020 14:27
Show Gist options
  • Save nktstudios/fd1865492dd3ed97ff3bc4863cc6ecb3 to your computer and use it in GitHub Desktop.
Save nktstudios/fd1865492dd3ed97ff3bc4863cc6ecb3 to your computer and use it in GitHub Desktop.
{
"cmd": ["g++.exe", "-std=c++14", "-o", "$file_base_name", "$file", "&&", "start", "cmd", "/c", "$file_base_name & echo. & echo. & pause"],
"shell": true,
"selector": "source.c++"
}
@SM-Fahim
Copy link

Not working on Linux

@apigeoneer
Copy link

works for me as well. thanks a tonXD

@HB-The-Shaymin
Copy link

thanks

@DavidRotariu
Copy link

how would I change this to make sublime text open terminus or cmder or windows terminal instead of cmd?

@Karl-Erb
Copy link

Thank you!

@Mobilelize
Copy link

Thank you, I hated having to go in cmd in the file location and typing "g++ -o run File.cpp && run" just to test out an Input this makes that faster.

@0x4nshu1
Copy link

0x4nshu1 commented Oct 9, 2021

Thanks You helped me!

@CODER1D
Copy link

CODER1D commented Oct 15, 2021

It helped me, thanks so much!

@Meruem10
Copy link

Thanks!

@Sakib62
Copy link

Sakib62 commented Jan 2, 2022

Thanks man.

@NathanimP
Copy link

Worked!

Copy link

ghost commented Mar 21, 2022

Thank you!

@HuyTran7801
Copy link

Spend all my honest to thank you!

@LeeTuah
Copy link

LeeTuah commented Jul 8, 2022

Not working on Linux

Use this code for linux:

{

"windows" :

{

"shell_cmd": "g++ -lm -Wall "${file_name}" -o "${file_base_name}.exe" && start cmd /c "cd . && ${file_base_name}.exe && echo. && pause" "

},

"linux" :

{

"shell_cmd": "g++ -lm -Wall "${file}" -o "${file_base_name}" && xterm -e "./${file_base_name}; echo; echo -n 'Press [ENTER] to exit... '; read -s" "
},
"osx" :

{

"shell_cmd": "g++ -lm -Wall "${file}" -o "${file_base_name}" && xterm -e "./${file_base_name}; echo; echo -n 'Press [ENTER] to exit... '; read -s" "

},

"file_regex": "^(..[^:]):([0-9]+):?([0-9]+)?:? (.)$",

"working_dir": "${file_path}",

"selector": "source.c, source.c++, source.cpp",

"quiet": true

}

@KartikShrivastava
Copy link

Thanks a lot

@Xelewet
Copy link

Xelewet commented Feb 14, 2023

Man, THANK YOU!!!!!!!!!

@jaypratap15
Copy link

Helped me, thank you!!

how to save it and where

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment