Kate Tree View Plugin Update

It’s me again. Given how much people seem to like the plugin, and that some would like to see this plugin replace the existing simple list view, I’ve put in a bit of work to make it so the tree view plugin replaces as much functionality of the original file list as possible.

There’s now a list mode (which was surprisingly easy to do), as well as the tree mode and I’ve extended the sorting support to include all but the “custom sort order” option of the original file list (it’ll take a bit more work to support that, if its something people actually use, I just haven’t felt like doing the work to get drag and drop to work, and before now it didn’t make much sense to add). While I was at it I also added a Settings Dialog Page for the plugin.

One improvement (imo) over the old file list, is that all tree view settings are session specific. Each session saves its own sorting, view mode, and item highlighting color settings.

Now for some gratuitous screen shots:

Here we see the new sort order context menu items, pretty dull so far.

Now it starts to get a little more interesting. The view mode context menu!

Ooh, and now we can see it displaying in list mode!

Again in list mode, but sorted by the document’s path, rather than just by document name.

And here’s the new config page. Nothing much to look at, but it works :)

I still have a couple more things I want to add, like a fancy way to filter and eventually, if everyone’s agreeable, I’ll thief the back/forward actions, and the “Go” menu from the main file list.

Before I go, I was wondering if people would be willing to help me with some distro packages, I might be able to manage some Debian packages, but I’m not sure when I’ll get to it so if anyone is willing and capable, have at it.

Thats all for now. Thanks for reading :)

17 thoughts on “Kate Tree View Plugin Update

  1. The new plugin is a really nice replacement for the old filelist. It is well seperated from the other kate app code, using solely the interfaces provided ;)
    I need to figure out, why sometimes plugins not get loaded for session restore and enable that the .desktop file can tell kate to have this plugin be default loaded.
    Then it really can replace the old list implementation.
    The automatic ordering in directories is really really nice, I never again mess up while working which main.cpp I am atm looking at ;)

  2. Yes please for Custom Mode, I use it a lot for sorting files that are in the same directory but don’t want alphabetically sorted.

    1. It supports the “opening sort order” mode, so you’ll get documents listed the order they are opened. The only thing “Custom Mode” does over “opening order” is that you can move them manually around.

      1. Please keep in mind that the custom sort mode is a pain to implement. At least the current implementation is quite crappy and even lead to crashes. The reason for that is, that if you use custom sort order, users want this persistent over sessions. I.e., if you open a session, the custom sort order should be recreated. In other words: It’s quite some work for not much gain. That’s why Christoph and me agreed that this is not really necessary.
        Thomas, implement it only if you find a clean way to do it ;) The code needs to be maintained after all for years after that (something that doesn’t happen with the current Documents list, btw…)

        1. The best idea I’ve come up with so far is adding some indirection to the lookup when custom sort is set… instead of just doing: map[row] do: map[lookup[row]] where lookup[] stores the re-mapping. But I’m not sure how clean that’ll end up being. have to think about it some more when I’m not so tired.

          1. I dunno about how hard it would be to re-code or anything like that, but I’m now using a version of Kate that doesn’t support “Custom,” whereas the last one did, and I’m sad. :<

            I don't care much about keeping document order over sessions, but I like to put files I'm working on most at the top of my list, ones I'm referencing towards the bottom of the list, etc. etc. and so on.

            My last Kate did have that capability, but the one on my newer computer doesn't. :<

            If the big problem is saving the custom order over sessions, could you just not include taht feature for custom ordering? I never worried about it, myself.

  3. Does the tree view mode only show files that are actually currently opened, or also all other files from the same directories?

  4. @thomas
    This is a great plugin, thank you. I work with similarly named files from different directories daily, and this does make my life easier.

    Since I’m not too familiar with GIT, it took me a Google to find out how to update my local Kate source. With changes to plugins like these, I have to re-build. I really love the simplicity of your guide on http://kate-editor.org/get-it/, even GIT noobs like me can understand what to do. Please consider adding instructions to the guide on how to update the source, e.g. cd ~/kde/kate; git pull?

    Thanks again!

    1. I commit to KDE’s svn, and Christoph seems to regularly merge git with KDE’s svn as well, so you should always be able to find kate and related stuff in KDE’s svn.

  5. I use the custom sort order every time I use Kate. If I don’t have it I will probably switch to a different text editor, which is a pain because I really like Kate. Please add it.

Leave a Reply

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

Scroll to top