Skip to main content
  1. Blog
  2. Article

Canonical
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:

#!/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.



Related posts

Challenges designers face in open source (and how to fix them)

Open source powers up to 90% of modern software, yet many projects lack usability. Canonical’s Design team surveyed 115 cross-functional professionals to uncover the 4 core...

Why web engineering is great

Hi, I’m Johann! I’m an engineering manager in Canonical’s web team. For the larger part of my 15 years of work experience as engineer, I’ve been working in web development....

Canonical’s recipe for High Performance Computing

In essence, High Performance Computing (HPC) is quite simple. Speed and scale. In practice, the concept is quite complex and hard to achieve. It is not dissimilar to what...

Web team – hack week 2023

Today, around 96% of software projects utilize open source in some way. The web team here at Canonical is passionate about Open source. We lead with an open-by-default approach...