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

This question is not only about HTML and PHP, there are some files which are written in more than one language. Let's take example of HTML; here you can do CSS and JavaScript stuffs in it.

In Notepad++ you can make it possible with an extension (FingerText). It has choice to define language for the snippet where you can define more than one language and snippet from PHP will appear when working with HTML and vice-versa.

When I started using Ubuntu I was stick to its default text editor gedit, it has a good snippet manager. But the only problem is you can't do what you can do in Notepad++.

So, any other plugin? or Any gedit core file which I can edit to achieve this?

share|improve this question
+1. Same problem. – Santosh Kumar Jul 5 '12 at 6:38
Maybe it's time to look beyond gedit into more featured IDEs, here's a good start – solarc Jul 5 '12 at 16:44

1 Answer 1

up vote 0 down vote accepted

I'm afraid that gedit is a fine notepad but it didn't seem to get a lot of development for a while. It does now have a collection of useful add-ins, but it doesn't have what you want.

It does, support document type detection in snippets, snippets can bound to a specific document type but can also be marked as "general". There is also a variable available $GEDIT_CURRENT_DOCUMENT_TYPE that can be used. But, of course, this doesn't really help your use case. So it may be that you could actually create something to do what you want. The programming language behind gedit is Python. The link I've given for the snippets documentation page also contains links on how to write your own plugins using C or Python.

If, on the other hand, you decide to try a different tool. The best editor I have found across all platforms is Sublime Text 2, so maybe have a look at that to see if it does what you want. It has a very vibrant development community and is also based on Python. Sadly it isn't totally free though it does continue in free mode with just an occasional reminder.

share|improve this answer
Commenting only because this happened to be on the front page for me; Visual Studio Code is a less complete IDE that has most of the main goals of Sublime including cross-platform availability, but never asks you to buy a license. (Sublime is also free forever, but will occasionally ask you to buy a full license) – Katana314 Jun 17 at 19:49
Certainly VS has moved on as have Microsoft. However, this question was in relation to Ubuntu not Windows. In fact, I no longer use Sublime Text as I found it too slow. I now use Adobe Brackets. Seems to do most of what Sublime does but is based on Node.JS instead of Python, has an active development community and does everything I need. It is also free. – Julian Knight Jun 17 at 20:02
As I said, Visual Studio Code is cross-platform. It's written based on NodeJS and only premiered in the past month or so. It's a very, very different product from what we know as "Visual Studio", even the Express editions. – Katana314 Jun 17 at 20:12
Oops missed that! Should have remembered actually so no excuse. I remember looking at it when it came out. Blame it on age :} – Julian Knight Jun 17 at 20:14

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.