Quickly Run with a Ctrl+R Keyboard Shortcut in Gedit

This article is more than 14 years old.


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 in your organisation?

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

Designing Canonical’s Figma libraries for performance and structure

How Canonical’s Design team rebuilt their Figma libraries, with practical guidelines on structure, performance, and maintenance processes.

Visual Testing: GitHub Actions Migration & Test Optimisation

What is Visual Testing? Visual testing analyses the visual appearance of a user interface. Snapshots of pages are taken to create a “baseline”, or the current...

Let’s talk open design

Why aren’t there more design contributions in open source? Help us find out!