Jump to Next/Prev Modified Line

In KDE SC 4.8, Kate was extended by the line modification indicators. These indicators show you what lines currently contain unsaved data, but also lines that were once changed but now are saved to disk:

Modified Lines

With Kate in KDE 4.13, we have two new actions in the Edit menu:

  • Move to Previous Modified Line
  • Move to Next Modified Line

In the screenshot above, moving to the next modified line does nothing, since we are already at the very end of the document. Moving to the previous modified line first goes to line 4, then to line 2, and finally to line 1. By default, no shortcuts are assigned, so if you you want to use this, it makes a lot of sense to configure shortcuts.

Modified and saved lines are treated equally, so maybe we should rather call it “touched” lines, since all lines that were touched by the user at some point in the edit history are taken into account.

The rationale behind these two actions is to allow fast navigation in the text that you actually work on. Jumping over hundreds of untouched lines is quite handy.

Hope this is useful :-)

4 thoughts on “Jump to Next/Prev Modified Line

  1. would be really great, if there were a “last modified line” as well — when i am editing a long document over a long time, it won’t really help to jump through all the dozen of lines i may have touched in the last hours, but rather to find the most recently modified one …

    1. This information is currently not stored internally. Technically, it would be possible with MovingCursors that get raised in a LRU list whenever a line changes. Still, if you paste e.g. 1000 lines, doing this may even be slow. Not sure :-) The good thing of the current way of doing it is that it’s very deterministic, and thus, easy to understand.

Leave a Reply

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

Scroll to top