Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
Dang! I've been searching for few hours a good plugin to finally notice about that. thank so much (kinda feel shame though)... – 발렌탕 Feb 27 '13 at 17:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.