I've been searching out for a plugin that could possibly wraps words with specified text.

For example I double click this word to highlight it :


and using a particular shortcut, it becomes as :

<b>word</b> or myFunction(word); or ...whatever depending what user defines.

I'm currently using Gedit v3. It would be really helpful if someone know a place where I can get this type of plugin.

1 Answer 1


The "Snippets" plugin will do exactly that. Depending on your platform and version of Gedit, it should already be included, in which case you can simply enable it by going to Edit -> Preferences -> Plugins tab.

If it is not present, you may need to upgrade Gedit, as it is a default plugin distributed with Gedit and I don't know of any way to obtain it separately. See http://projects.gnome.org/gedit/plugins.html.

To manage snippets, go to Tools -> Manage Snippets. One of the snippets already created for you is "Wrap selection in open/close tag." The snippet markup itself is:


and the trigger is Shift+Alt+W. You can easily copy this snippet to a new one and replace the tag and trigger to customize to your needs:


will wrap the selected text in "em" tags. You can even trigger snippets for tab completion, such as this one included for Java:

public static void main(String[] args) {

Simply typing "main" and pressing the Tab key will create the function body.

  • Dang! I've been searching for few hours a good plugin to finally notice about that. thank so much (kinda feel shame though)...
    – vdegenne
    Commented Feb 27, 2013 at 17:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .