Sublime Forum

Patch to read from stdin

#1

We all have missed having in ST an interactive Terminal allowing reading from the keyboard when our code is running. I need it a lot as I evaluate hundreds of .cpp files and the execution many times asks for data with cin. A quite practical solution I’ve found is adding a last builder that sends the pdpaste as stdin to the application running.

	,{
		"name": "echo cosas | Compila && ejecuta",
		"cmd": ["bash", "-c", "c++ -std=c++20 -stdlib=libc++ '${file}' && echo `pbpaste` | '${file_path}/a.out'"]
	}
0 Likes

#2

better: pbpaste | '${file_path}/a.out'" :face_with_hand_over_mouth:

0 Likes