Skip to content

Posts 

Design Ideas of the Kate::TextBuffer

Sunday, 28 February 2010  | Christoph Cullmann

Storage

  • Basic idea: text stored as lines
  • Lines hold text and additional data (like for highlighting)
  • Advanced Concept: Stores lines in blocks of xxx lines, to have better performance

Cursor Support

  • They will move on editing
  • Cursors can be combined to ranges
  • KateTextCursor will be stored in the buffer blocks

Transactions

  • Each edit action must be encapsuled in a transaction
  • startEdit/endEdit will do this
  • Signals for starting and ending this transactions

Revisions

  • After loading, buffer has revision 0
  • Each edit action which is no nop will lead to increment in revision number
  • Successful saving will reset revision back to 0

Editing Operations (only 4 different editing primitives)

  • Insert Text (inside one line)
  • Remove Text (inside one line)
  • Wrap Line (wrap a line at given position, create a new line with content behind wrap position)
  • Unwrap Line (unites the line with its predecessor)
  • Signals for all of these actions, containing the change (to allow to layer undo/swap file support/…) on top of the buffer

Load/Save & Encodings

  • Loading will try to use given codec, if that doesn’t work, try to detect the codec by the BOM at start of file or use fallback codec, if that again doesn’t work, given codec will be used again, and errors reported
  • Saving will just use the given codec

Unit Tests

  • Each of the above implementation details will be covered by unit tests
  • KateTextBuffer (+KateTextLine and Cursor) must therefor be usable without other components

Kate Partly Moving to Gitorious

Saturday, 27 February 2010  | Dominik Haumann
We are about to move the applications Kate and KWrite as well as the libraries KTextEditor and Kate Part to gitorious. Christoph is working on the migration right now in order to keep the development history. Things look good so far, so the migration is soon finished.
We have discussed a bit about the migration to gitorious on the Kate Developer Meeting and Christoph came up with this mainly because building only KTextEditor, Kate Part, KWrite and Kate is much faster and easier compared to building the KDE modules kdesupport, kdelibs, kdepimlibs, kdebase, kdesdk.
I myself remember the time where I started KDE development, and it took more than two weeks to have a first successful build of KDE. You have to learn so many things at once, like revision control, lots of so far unknown software, and what not. Talking to other developers verifies this. In other words: Getting into KDE development is not easy and straight forward.
Moving to gitorious removes this barrier for Kate development: You just checkout the Kate repository and that’s all you need. It would be nice if you join Kate development and contribute patches :)
What does that mean for Kate in KDE? Nothing changes. We will merge the changes in Gitorious back to the main KDE development line and vice versa. Read More

Kate Highlighting for QML, JavaScript

Friday, 26 February 2010  | Milian Wolff

Hey everyone!

qmlhlQML Highlighting in Kate

I’ve started my internship at KDAB this week, it’s great fun so far! Though I spent most of my time this week on Bertjans KDevelop plugin, I couldn’t resist on a bit of Kate hacking:

steveire is experimenting with QML so I couldn’t stop but notice that there is no highlighting for it in Kate. Well, there was none ;-) Now you get pretty colors, rejoice!

Read More

Kate Highlighting for QML, JavaScript

Friday, 26 February 2010  | Milian Wolff

Hey everyone!

qmlhlQML Highlighting in Kate

I’ve started my internship at KDAB this week, it’s great fun so far! Though I spent most of my time this week on Bertjans KDevelop plugin, I couldn’t resist on a bit of Kate hacking:

steveire is experimenting with QML so I couldn’t stop but notice that there is no highlighting for it in Kate. Well, there was none ;-) Now you get pretty colors, rejoice!

Read More

Kate/KDevelop HackSprint – Up To Day 4

Wednesday, 17 February 2010  | Milian Wolff

Woha, quite a few days flew by without me blogging about anything. Thankfully the others started to write so I don’t have to repeat it all ;-) Instead I’ll concentrate on stuff I did or learned.

GHNS for Snippets

Well, first I think an excuse is in oder: There is a GHNS button for Kate Snippets in 4.4.0 but it’s broken, neither me nor Joseph had time to acutally use and fix it… But anyways, I fixed it now for 4.4.1. For 4.5 we’ll also have an Upload Dialog.

Read More

Kate/KDevelop HackSprint – Up To Day 4

Wednesday, 17 February 2010  | Milian Wolff

Woha, quite a few days flew by without me blogging about anything. Thankfully the others started to write so I don’t have to repeat it all ;-) Instead I’ll concentrate on stuff I did or learned.

GHNS for Snippets

Well, first I think an excuse is in oder: There is a GHNS button for Kate Snippets in 4.4.0 but it’s broken, neither me nor Joseph had time to acutally use and fix it… But anyways, I fixed it now for 4.4.1. For 4.5 we’ll also have an Upload Dialog.

Read More

The Power of Developer Meetings

Wednesday, 17 February 2010  | Dominik Haumann

Since several years, we have lots of small developer meetings in the KDE project, gratefully supported by the KDE e.V. There, developers of a certain project (e.g. KMail/kdepim, Plasma, you name it) meet to discuss further plans and to push the project further. From experience we can tell that those meetings are really beneficial in several ways:

  • Social aspect: You get to know the other developers involved in the project in real life, which is a great motivation factor. This also happens at KDE’s annual conference Akademy, although there are a lot more people.
  • Productivity: Since you are sitting next to each other discussions about how to do what are very focused. It’s amazing how quickly a project can evolve this way. (I haven’t seen such focused work in companies, yet. I guess the variance in the knowledge of people involved is higher. And the motivation is usually very different).
  • Knowledge Transfer: Since participants are experts in different areas, discussions lead to knowledge transfer. This is essential, as sometimes developers have very few free time to contributes to a project. Spreading the knowledge helps a lot to keep the project alive.
  • Steady Contributions: We are always open for new contributors. Just send a patch, get commit access and join development. Experience shows that participants of a developer meeting usually contribute for years to come.

Enough said, here is what happened the last three days in Kate:

Read More

Developer Meeting: More on scripting Kate

Wednesday, 17 February 2010  | Dominik Haumann
We are 10 people here at the developer meeting in Berlin. Kate, KDevelop as well as Okteta see a lot of commits. I’ll mainly talk about what’s happening in the holy Kate land, though :-)
Yesterday I closed a bug requesting an “unwrap” feature in Kate that works like “Tools > Join Lines” but maintains paragraph separation, i.e., empty lines are not removed. This feature is implemented now in javascript. Further infos: Read More

Kate/KDevelop HackSprint Day 1

Saturday, 13 February 2010  | Milian Wolff

So, first day of the Kate/KDevelop hacksprint.

We just talked and hacked at the rented flat,got to know each other and had a fun time. Everybody made it more or less in time, even last minute attendee Adymo from Ukraine, nice! Hacking-wise the productivity wasn’t that high, esp. for me, but a few patches got committed here and there.

Right now I’m working on a little speedup for Kate, esp. for big MySQL files - lets see how it turns out. Cullmann showed me a few things I could do so maybe it works out, lets see.

Read More

Kate/KDevelop HackSprint Day 1

Saturday, 13 February 2010  | Milian Wolff

So, first day of the Kate/KDevelop hacksprint.

We just talked and hacked at the rented flat,got to know each other and had a fun time. Everybody made it more or less in time, even last minute attendee Adymo from Ukraine, nice! Hacking-wise the productivity wasn’t that high, esp. for me, but a few patches got committed here and there.

Right now I’m working on a little speedup for Kate, esp. for big MySQL files - lets see how it turns out. Cullmann showed me a few things I could do so maybe it works out, lets see.

Read More