I came to notice that gedit has an 'External Tools' plugin which lets you execute commands in a window within the editor. So I created a tool that with one keypress will compile and execute whatever is currently on screen (saved or not). This works well for my purposes on testing non-interactive code.gcc -x c - < hello.c; ./a.out
To set that up in gedit;
Edit>Preferences>Plugins, Enable 'External Tools'
Tools>External Tools>New
Commands:
Input: Current Document#!/bin/sh
gcc -x c - -o $HOME/.tempc;
$HOME/.tempc
rm .tempc
Fun!
0 comments:
Post a Comment