[Tutorial] Press One Key To Compile And Run a C Program in Gedit

  1. Go to “Edit” > “Preferences”
  2. Click “Plugins” Tab
  3. Check the “External Tools”image
  4. Close “gedit Preferences”
  5. Click “Tool” > “Manage External Tool”
  6. Click the “PLUS” icon button and name it “Run”
  7. In “Edit” Textfield, type the commands below
  8. Shortcut Key > press F5
  9. Save: Current Document

#!/bin/sh
gcc $GEDIT_CURRENT_DOCUMENT_NAME -o program
xterm -hold -e ./program

image

Now write a simple program and press F5 to see what happen, haha.

image

Enjoy!