• Kate Tree View Plugin Update

    by  • September 12, 2010 • Users • 17 Comments

    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 Responses to Kate Tree View Plugin Update

    1. September 12, 2010 at 20:07

      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. John
      September 12, 2010 at 20:12

      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.

      • Thomas Fjellstrom
        September 12, 2010 at 20:28

        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.

        • haumann
          September 12, 2010 at 21:47

          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…)

          • Thomas Fjellstrom
            September 12, 2010 at 21:52

            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.

            • Jesse Albanese
              June 9, 2012 at 04:30

              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. uetsah
      September 12, 2010 at 20:58

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

      • Thomas Fjellstrom
        September 12, 2010 at 21:05

        It shows only open documents.

    4. rwman
      September 13, 2010 at 13:08

      packaging for all major distros is easy with this:
      http://www.kdedevelopers.org/node/4177

    5. Robert
      September 13, 2010 at 13:26

      I really like this feature. I think it’s been needed for a long time.

    6. Werner
      September 16, 2010 at 14:35

      @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.

      @christoph
      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!

      • Thomas Fjellstrom
        September 16, 2010 at 14:51

        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.

      • haumann
        September 16, 2010 at 19:30

        True, I’ve added a note for that: git pull in ~/kde/kate :)

    7. Batiste Bieler
      November 3, 2010 at 23:17

      That’s perfect! I did a similar plugin a year ago or so and it was a bit like that:

      http://batiste.dosimple.ch/blog/2007-12-21-1/

      Keep up the good job going and try to get your code into Kde.

    8. Alan James
      May 4, 2011 at 12:45

      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.

    9. May 31, 2011 at 11:54

      hi,
      I searching about kate column editor plugin. are you have this plugin?
      thank you very much

    10. Toto2
      July 5, 2011 at 16:41

      Î also use custom sort order all the time.