Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am attempting to use gedit's "snippets" plugin. They work great in Ubuntu, but I've since switched to Debian. Now, even though I have enabled Snippets, they don't work when I am editing files on a remote (SFTP) server.

They work great locally (create file, set language as PHP, try snippets), which is of small comfort, since I'd prefer to work on the remote server.

Is this a bug in gedit Debian? I am using Squeeze.

Reproduction steps (Using Debian Squeeze 6.0.2):

  • In gedit, enable Snippets (Edit -> Preferences -> Plugins -> Check "Snippets")
  • Open a new SFTP connection in nautilus (Places -> Home -> Ctrl-L -> s
  • Double-click on a php file to open it in gEdit
  • Type "foreach" and press tab. The rest of the code should be automatically filled in. Note that this does not occur.
  • Open a new document (Ctrl-N)
  • Set the language (at the bottom) from "Plain Text" to "PHP"
  • Type "foreach" and press tab. Note that the rest of the code does automatically populate now.
share|improve this question
Could you please provide a clearly defined test case so others can try to reproduce (and hopefully fix) your problem. – N.N. Sep 8 '11 at 8:14
Hi N.N. thanks for the comment. I'll try to elaborate in the original post. – Julian H. Lam Sep 8 '11 at 13:00
This may not be due to snippets not working in remote mode but due to gedit not updating correctly to what type of text its viewing since it works when you change from plain text to php. – N.N. Sep 8 '11 at 13:23
Hi N.N., attempted to switch the text type from PHP to Plain Text, then back, but to no avail. I initially mentioned Ubuntu as Ubuntu tends to use more updated packages... – Julian H. Lam Sep 8 '11 at 18:53
Do snippets work on this Debian server when working locally and not thru SFTP ? (please include @harrymc in your answer). – harrymc Oct 16 '11 at 19:00
up vote 1 down vote accepted

To sum up the comments, gedit seems to work correctly as regarding snippets when invoked in a "normal" context.

It only seems to have a problem when invoked by double-clicking on a remote file, so that it executes with a remote directory as the current. This indicates a rather puzzling bug in gedit.

The poster has accordingly filed a bug report. The last entry dating from 2011-10-18 says :

Quite a lot of fixes came into snippets in the version 3.2.0
would be good to get this tested in that version.

share|improve this answer
harrymc, thanks again for your help. The bug seems to have been recently fixed upstream. Hooray! – Julian H. Lam Jan 21 '12 at 22:23

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.