With the easy-to-use (and pre-installed) command line utility zenity, it is pretty simple to create useful external tools for gedit!
To use them, just check if the “External Tools” plugin is activated and copy&paste the tools you want into the Tools → Manage External Tools… menu. Alternatively, you can download all files, copy them ~/.gnome2/gedit/tools and they are automatically recognised by the plugin. Make sure to adjust the shortcuts if you choose the second approach.
As I said, zenity is a wonderful easy tool, so don’t hesitate to edit the scripts, for example, if the width of a zenity popup does not suit your screen settings.
Update: Since the code lives on github, I replaced the snippets with screenshots.
Feel free to fork and add new ones ;). There will be another article with more tools in about a month. If I think one tool is pretty useful, I will feature it in the article.
[ruby] check syntax
Let’s begin with a simple syntax checker. Hit the shortcut and a little popup will tell you the truth.
[ruby] load into irb
Often you want to run code and further interact with the results. You can do it by requiring the ruby file in an irb session. This tool does this for you.
[ruby] run rake task
This shows a selection dialog with all available rake tasks in the current file’s directory. It runs the selected task in the bottom pane.
[ruby] run capistrano task
Same again, for capistrano.
Simple git integration
Here are some tools for common git actions. They do not aim to cover everything, replacing git command line action. They just try to simplify often done workflow tasks.
Hit the shortcut to get the git status of the current file’s git repository.
See what has changed in the current file.
This displays a menu with common add/commit tasks. For more complex purposes, you need to do it manually. The number column allows fast shortcuts.
Some more tool snippets I find useful.
[selection] crypto hash
Select some text and replace it with a hash value. You can also edit the selected menu entry to choose a different key length for SHA2 or to append salt to the string.
[create] save tabs as tgz
A relaxed way to create a flat .tgz archiv: open all documents which should go in there and start this tool.
[create] export to syntax highlighted html
Get code into a nice html format using coderay ;)
[internet] download url (wget)
Quick access to the internet ;)