Is there any way to compile and run .c files by using a shortcut key using gedit? I know its possible for java and C++, and I read somewhere that it is possible to do so using scripts in external tools. I'm currently compiling my files by gcc -Wall name name.c then ./name, but i would like to make this process faster

I already tried the below script for my shortcut but it generates an error saying

fatal error: no input files

  • Your last line has a typo. Surely "$GEDIT_CURRENT_CODUMENT_NAME" should be "$GEDIT_CURRENT_DOCUMENT_NAME"? – Hugo Buff Mar 13 '14 at 14:17
  • You might also want to look into learning about makefiles. – Hugo Buff Mar 13 '14 at 14:19

The default build command of the gedit external tools works perfectly for me (run using Ctrl+F8):

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.