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:

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

Hope this helps you too.


Talk to us today

Interested in running Ubuntu Desktop in your organisation?

Newsletter signup

Select topics you’re
interested in

In submitting this form, I confirm that I have read and agree to Canonical’s Privacy Notice and Privacy Policy.

Related posts

Design and Web team summary – 8th July 2020

The web team here at Canonical run two-week iterations. Here are some of the highlights of our completed work from this iteration. Web squad Our Web Squad...

Design and Web team summary – 22nd June 2020

The web team here at Canonical run two-week iterations. Here are some of the highlights of our completed work from this iteration. Meet the team My name is...

Making the MAAS machine list fast with React

We have been transitioning the web interface for MAAS from AngularJS to React. One of the reasons for this is to make the interface faster. The main page with...