GtkSnippets is a library to manage snippets for all Gtk applications. We try to have an user database with all snippets and all application can use GtkSnippets to access to the same database. By example you can develop a gedit plugin using this library and an Anjuta plugin. The snippet database is the same for the user and he can use his snippets into gedit and anjuta.

Project homepage:



There are two libraries:


This library manage the database access. Internally uses sqlite3 in the user home.

This library have a parser to use simple wariables into the snippets content. By example we have this snippet content:

  • class ${classname} extends Object{}

Then you can pass a variable classname=MyClass and the result will be:

You can use GtkSnippetsVarsDialog to easily replace the vars into the snippets content.


This library have various widgets to manage the snippets;

  • gtksnippets-dialog: Dialog to add, modify, remove, etc.

Snippets vars replacement

  • gtksnippets-varsdialog: Dialog to replace variables into the snippets content.

Snippets Manager

  • gtksnippets-inplaceparser: Replace variables into a GtkTextView directly "in place".

In place parser

Snippets Completion

We have developed an Snippets provider for GtkSourceCompletion. This provider adds snippets support to GtkSourceCompletion. This provider adds a new page into the completion popup with the snippets for this language and you can select it and the snippets content will be added to the current text (or source code).

You can take a look at this screencast to see this in action.

Snippets completion with GtkSourceCompletion

Attic/GtkSnippets (last edited 2013-11-23 00:00:49 by WilliamJonMcCann)