I just started using Geany for a week. And always having to hit F9 to build and then hit F5 to run, it just sucks. So is there any way to config Geany so that it'll build and then execute immediately (like F9 in CodeBlocks) ?
You can add your own custom commands or even adjust existing ones. Go to Build->Set Build Commands and change the compile command to something like command1 && command 2. The && should cause your POSIX shell to execute command 2 if command 1 was successful. Inside wiki there is a more verbose version of documentation what can be done on "Set Build Commands"
I know this is old but I just figured out how to do this on Ubuntu Linux.
-Click "Build" in the menu at the top
-At the bottom go to "Set Build Commands"
-Prepend the command in the "Build" section before the command in the "Execute" section.
Execute should look like g++ -Wall -o "%e" "%f" && "./%e"
.
Here are before and after images.
Default Build Commands
Build and Execute Combined
You should now be able to build and run your program by pressing F5 (default) once or running execute from the build dropdown menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With