Multiple Windows & Kate on KF5

In KDE 4, you can open a new window for Kate via “View -> New Window”.

This won’t start a new application instance but just add an other Kate main window to the current instance (which shows the same documents & session & projects).

This is kind of complex to handle internally and we think about dropping that behavior and instead launching just an other Kate application instance if you trigger that menu action.

Pro: Easier code structure, less to maintain, less bugs. Each window is an own process, e.g. if one crashs, not the others die, too.

Contra: You will loose the have the same documents open in two windows with syncing (as the two windows would then be individual processes).

Any opinions about that out there in the lazy web? Feedback is welcome.

24 thoughts on “Multiple Windows & Kate on KF5

  1. For me this feature is extremely useful. I use it almost every day – it helps a lot when you need to work with files that have become a bit larger than one would like. For example, it allows me to modify both histogram initialization and histogram filling code in my physics analysis while copy-pasting code from the respective other one.
    The possibility of inconsistencies between the two instances could get ugly when working over SSH, as you wouldn’t even notice if you accidentally overwrote changes from one instance by saving in the other one.

    I do admit, though, that it probably won’t be as important for most other people.

    Finally, one additional contra: I’m pretty sure you would more-or-less double your memory usage in the two-instances case, right? That can be a pretty significant increase when you are working on many files at the same time.

    1. Isn’t there a “split window” mode in Kate? Such a mdoe seems to fit your wokflow, i.e. working on 2 (or more) positions in a given large document.

      1. You’re right that the split-window mode could help to some degree, I didn’t think of that.
        It’s quite a bit less convenient, though – in my use-case I would have to stretch one window across two differently-sized monitors and either waste space on one monitor or cut off part of the window on the other (this is probably also what Bastian alludes to).

    2. Same here: Would it be enough, if we allow to have a view of a document split off the main window? e.g. that “New Window” would just create some extra top-level window showing the current document? (like some KWrite window)

      1. My answer would be basically the same as terr’s reply to the same question below :)
        If the changes aren’t synced between the windows it behaves pretty much the same as the original two-instance proposal, right?

  2. IMHO, the greatly reduced possibility of a crash due to the multi- vs single-process architecture is enough per se to just go for it :)

  3. Please don’t drop that feature. Maybe It’s just me but I almost always use kate with at least two windows with the same document. And a split window doesn’t come close to the flexibility of multiple windows (for me at least). And less crashes? I actually can’t remember the last time kate crashed on me….so I’m pretty happy with the stability

    1. Would it be enough, if we allow to have a view of a document split off the main window? e.g. that “New Window” would just create some extra top-level window showing the current document? (like some KWrite window)

      1. I’m not sure what you mean. Something like spawning a “limited purpose window” from the “full” one to be used just for showing the document? (but in sync with the modifications done in the “full” window) I guess it would be better than the alternative.
        However, it would still be a limitation wrt the status quo. It may seem strange but I’m usually “all over the place” when I write code and modifying a file at different points each in a different window is actually something that I do all the time.
        Anyways, it’s just my opinion and of course you have to consider the work you would need to put in to keep the current behavior.

  4. What can I say? I want them both. A major reason for not using Kate (and Geany) is that it always wants to pile everything into the window (even if there are two). I want to choose.

  5. I used to use this feature. Certainly very useful with multiple monitors, but with a single monitor it’s not really necessary.

  6. A very welcome change (imho), as the current implementation does not work pretty well in more complex cases and therefore can become pretty annoying. For instance I work with multiple activities and tabbed windows (kwin tabbing feature). In that case there are many cases that would need to be addressed. For example if kate is open on another activity in an unfocused tab and I open a file on another activity the acitivity is changed to the one where kate is open, but the tab is not focused etc. So the be honest the current implementation does not consider all possible cases and therefore dropping that behavior is welcome.
    As pointed out earlier split-view is a better substitute.

  7. I just used the split-window mode so far. But with multi monitor setups I think the ability to have more than one window makes sense. For me the ability to drag out a view into its own window would be enough. Thanks you for a great editor, Martin

  8. I quite like this feature, please keep it. It works better on dual monitor settings than split view. Kate has never crashed on me. So I don’t think it is a problem at all.

  9. As others have said before, with dual / multiple monitors, the ability to open an additional view of the same project / document list (and have the contents of both windows always sync without all those “document modified by external application” warnings) can be very convenient. I have particularly grown to use and like the ability to split each window/view individually into different sub-views during refactoring/debugging/optimization activities, especially because I can easily switch between furious-editing-with-two-windows-side-by-side mode and one-editor-window-one-debugger-for-two-monitors without having to rearrange the geometry of my editor window.

    The convenience this feature brought to my workflow was, in fact, the sole reason to get a second monitor at my work place :-)

    So while I would be very sad to see this feature go, I can understand if the complexities of keeping everything in sync are not deemed worth the costs of maintenance. Moreover, I do not use activities and other, more advanced features of the KDE frameworks, so while I have not whitnessed kate crashing in a very very long timeframe, I would not trust my judgement that everything seems pretty stable in all scenarios.

    Anyway, thank you for all your hard work for a magnificient piece of software!

  10. I think simplicity and stability are more important; if the code is easy and unconvoluted, it’s easier to focus on other features and ideas.

    But I don’t use that feature, so obviously I’m going to agree with removing it. ;)

  11. Dropping features some people using actively only because it makes „the code nicer“ is a bad idea, imho. Easy to maintain code is very important, but that’s not an end in itself. The features are counting more. Especially for the users ;-)

    I know some other desktop environment dropping existing features because they think the average user don’t understand or need it. Or they simply aren’t willing to maintain complexity and using that as an excuse. I hope KDE will never get so far!

    I don’t know whether the effort of making it possible to drag an editor tab into its own window is the same as the current solution with a full kate window with synced content, but it sounds like a sensible solution if it’s easier to implement. That would be like the very handy tab-window management of a current eclipse 4.x where I can move every subview – even the editor tabs – to some other monitor. That is worth a mint in some situations!

    At that point I want to thank you for all the work on kate. It’s really a great editor! It’s the only graphical one I know which handles multi-GB text files in a decent way (sometimes I have to edit big sql dumps by hand if you wonder… :-| ).

    So continue that great work. I’m already eager waiting for Frameworks 5 :-)

  12. I definately need a second separate instance of kate allowing for displaying tree of opened files. A tree that is completely independent from other window. I simply need 2 seperate Kate instsances like 2 instances of Word (or 2 open documents in seperate windows).

  13. With the Ubuntu version 15.04, I am unable to use kwrite and I am “obliged” to use kate. I must say that I do not appreciate the way of working of kate and I miss very much the independent windows of kwrite. As I do a lot of programming in different languages and writing documents, it was common for me to have more than ten open documents in separate windows where I had Latex, Fortran, Scilab … If kate could have the same possibilities as kwrite, it would be wonderful.
    Of course, I can open ten (or more) terminal windows, but this is not very convenient.

  14. The reason I use kwrite and not kate is because I take advantage of having multiple windows open at the same time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top