Gedit, is split view of same file currently available?

What I mean is editing the same file parallel in two windows/tabs – changes in one area become visible in the other one immediately.

That feature was available some years ago, but I never needed it. Now I would need it for some C++ code editing, but can not manage to get it working. Google does not really help.

Would be sad if it should have been removed – it is supported by GTK-Source-View, I hacked it into my plain Nim editor some years ago. Just tested, works fine still. But that editor was customized to Nim language, it is unuseable for C++. (https://github.com/StefanSalewski/NEd)

While multiple views does work with GtkSourceView, making it a good experience requires manual intervention on a number of things. One example is that Builder tracks focus and disables/re-enables a number of properties that interfere with the users ability to visually track focus. You also will want to disable features like completion so that automated text operations (often implemented in plugins) don’t incorrectly activate features in the GtkSourceView.

Taking a quick look at the source, shows that GeditTab has a 1:1 mapping between GeditDocument and GeditTab due to the use of g_object_set_data().

While I don’t ever remember the feature having been implemented in Gedit, if it was, it was probably years ago before lots of source and maintenance cleanup. Even four years ago, when I started Builder, I had to fix things in GtkTextView and GtkSourceView to make it work properly.

Thanks for your answer.

Indeed split view is rarely used. But I think starting in 2010 some people asked about it for gedit, and I think around 2015 it was indeed available in gedit . (I tested it a bit in my NEd editor and was surprised how well it worked.)

I was not aware that GTK builder acts with widgets at runtime at all. (If I remember correctly, I used builder for NEd, but the multiple GtkSourceView widgets were generated without Builder at runtime. But I have not touched that code for many years, it was done with the oldGTK3 low level Nim language bindings still, and now we have the g-introspection based gintro bindings…)

I should note that when I say “Builder”, I mean GNOME Builder, not the GtkBuilder class.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.