The new code folding is taking shape. Actually it is implemented. 🙂
The next step will be testing it (and debugging, if necessary) and implementing some new features.
Also there are some keyboard shortcuts that didn’t worked so well on the previous version and they need to be fixed too.
If you want to help us with the testing, you can download my clone and play a little with code folding. Also, if you have some ideas about the new features that Kate’s folding should have, let me know. If it is possible and there is time, they will be implemented.
Now that the next version of the KDE platform is branched, it’s time to have a look at all the changes in Kate in KDE 4.7.
Current State of Kate
- In KDE 4.6, we replaced the document list by the new File Tree. We got relatively few critical reports, meaning that the file tree seems to work pretty well for the majority.
- Kate has two GSoC projects at the moment: Rewrite of the code folding, and Improving Kate’s vi mode. The work done in both projects will be available in KDE 4.8, so we are already working on the next major KDE release.
- About 6 Kate developers are present at the annual KDE conference.
- A year ago, the Kate homepage was redesigned. Looking back the last year, we can say that this has been a success.
Just in case you missed it: you can read about Kate’s state 6 months ago here.
I bring good news about Kate’s folding today. The algorithm was implemented and tested successfully. 😉
As I mentioned in the previous article, I implemented it in a new (simpler) project. It is a Qt project (developed using Qt Creator) and you can find it in my Kate clone, “tree_alg” folder.
Actually, I have implemented two folding algorithms: one that uses a tree that changes itself dynamically whenever you insert or delete a node, and one based on stack that rebuilds the entire folding tree whenever you insert or delete a node. I needed two algorithms because I wanted to implement an automatic testing mechanism and for that I needed a way to test the output. The second algorithm was easier to be implemented and it was very stable (bug-less) from the beginning, so it was great to use it for my testing.
The automatic testing proved to be a success. I hope I found all the bugs, but I would like to invite you to download the project and to play a little with this application. If you do find any bugs, please send the history files on the mailing list and I will fix them. About these history files, when you save the history two files will be created. E.g.: if you save your history in a file called “history_1”, then you will have (in the same directory) a file called “history_1” and a file called “history_1_moves”. Please send them both if you notice any bug. It will make my debugging much easier.
My next move is to integrate this tree folding algorithm into Kate’s folding. For this part, I will have to finish an undone job from a previous week (rewrite the interface and the update methods) and add the algorithm I have just implemented.
I think that in ten days at most we will have a new code folding for c style languages. 🙂
All the best,
Well I’m not sure this really qualifies as an update, because it is actually a new plugin. And the plugin I’m talking about is the Search plugin. This is going to be mostly a series of screen-shots.
The first shot contains the “new” feature differentiating itself from the other one. You can now select to search in the currently open files. This is especially good if you are working on files on a remote server.
The “Find in files” plugin opens new searches in new toolviews while this one has a button for adding new tabs if you want to save the old search.
Of course you can also search in a folder as before 🙂 When you select to search in a folder the folder searching specific options are displayed. Those options can also be toggled with the rightmost tool-button.
And the final screen-shot is to show that it is possible to use regular expressions.
The “Replace” feature is not yet implemented, but who knows 😉 Ideas for a UI are welcome.
And that was it for this time. I hope you like the updates 🙂