Friday, 11 June 2010

Quickly Run with a Ctrl+R Keyboard Shortcut in Gedit

I'm all about workflow, so the first thing I wanted to do when trying quickly was to make sure I could hit a keyboard shortcut to build and run from within my editor.

It was a bit fiddly, but here's something that works:

In Gedit go to Tools=>Manage External Tools...

Then add this:

Here's the code:

EHOME=`echo $HOME | sed "s/#/\#/"`
while test "$DIR" != "/"; do
    if [ -f "${DIR}/" ]; then
        echo "Using quickly from ${DIR}" | sed "s#$EHOME#~#" > /dev/stderr
        cd ${DIR}
        quickly run
    DIR=`dirname "${DIR}"`
echo "Couldn't find Quickly project folder!" > /dev/stderr

Hope this helps you too.

No comments:

Post a Comment