What's common between gedit and meld?

Hi :slight_smile:

I saw there is a look and feel, and more, which are common between gedit and meld.
For example, the lexic corresponding to a detected language.

Could you explain me how it works please ?
Would it allow to compare with meld 2 files opened with gedit ?

On Mac, I was used to TextWrangler :

With one app, I could :

  • open a file,
  • edit it,
  • compare the edited version and the disk version,
  • search a word in all files of a directory,
  • choose one file of the results,
  • compare this file and the edited file.


Both Gedit and Meld use the “gtksourceview” library for their text editor widget. It offers syntax highlighting, and supported languages are shared for all apps using that lib.

I’m not sure the workflow you describe can be easily done with Gedit+Meld… You could write a Gedit plugin that saves the current edited state to a temporary file then launch Meld to compare it with the original disk version, but I don’t think it’s convenient, and you won’t have real-time sync between Gedit and Meld…

The hard way would be a Gedit plugin that basically re-implements Meld…

OK :slight_smile:
Where is it discussed ? Categories > Applications and Tags > gtk ?

It’s better than nothing. :slight_smile:
However, I don’t know write plugins, I’m an Ada dev.
Is there somewhere I can ask / suggest to write this plugin ?

I think it would be a bad idea anyway.

IMHO the best would be to merge Gedit + Meld in one app.
Do you think they prefer to keep several small apps with not too much features in each ?

IMHO the best would be to merge Gedit + Meld in one app.
Do you think they prefer to keep several small apps with not too much features in each ?

Speaking only for Meld, I have no interest in trying to reimplement all of gedit, nor trying to merge the two. The challenges caused by a multi-pane view are significant and most of Meld’s code base concerns handling that.

I also think adding that handling to gedit would add massive complication to a code base for a single feature, and would almost certainly result in a worse UI… but that’s not up to me.

1 Like
  • Category > Platform
  • Tags > gtksourceview
1 Like

I also prefer “small” apps that do only one thing but do it well.

gedit could launch meld to show some diff, it’s something possible to prototype as a third-party plugin.

Also, some people prefer an IDE, so a libmeld would be useful, to integrate everything in a single app.

Having such high-level libraries (libdevhelp, libmeld, …) is useful to share code between the small apps (Devhelp, Meld, …) and an IDE.

(Creating a library doesn’t imply to offer stable API guarantees. And previous versions of the library can be bundled with the app. There are many possibilities for writing re-usable code, and no, I don’t think it’s “over-engineered” to develop high-level and domain-specific re-usable code!).

Personally, I needn’t a full IDE, but a full text editor (like TextWrangler).

I mean, it has to handle text-related things, like:

  • keywords, comments, indentation, …,
  • multi-files search,
  • replace and search next,
  • comparisons between any open files or search results, edited or on disk,
  • eventually, hex view.

But it has not to handle too language-specific things, like:

  • compilation,
  • run,
  • debug.

I can do those easily with the Terminal.

I agree with the principle :slight_smile:

I agree it should not be over-engineered, and making modules should always help to make clean code even for small apps.
But it’s much harder to choose the interface (that is, where you cut the code between the lib and the app) when you are developing only 1 small app (and not even a 2nd small app doing something a little bit different to share the lib with), and so you have to imagine what the IDE devs will expect for the lib to do.

I hope @kaiw will think about it (if he hasn’t already), without doing something too quickly. :slight_smile:

1 Like

While I support the broad idea here, I personally have had less and less time to spend on maintenance, and breaking out Meld into reusable components is a bunch of work that could instead be spent on making much more fundamental improvements.

On a more practical level, Meld being written in Python is probably a showstopper for most programs that might want to reuse its widgets. I suspect that if we actually broke out a reusable library it would see minimal use.

Having said all that, if someone wants to try and make this happen, I’m happy to provide whatever guidance I can!

1 Like