Bug 310738 - JJ: Jump to next/previous change
Summary: JJ: Jump to next/previous change
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2012-11-26 22:31 UTC by rjwgnr27
Modified: 2014-02-21 22:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rjwgnr27 2012-11-26 22:31:56 UTC
Kate tracks changes in a file, and has the option of of showing change markers.

A useful compendium tool would be to jump to the next/previous changes. There are various uses for this, such as reviewing the names of newly declared variables variable (jump back to the change which defined the variable); reviewing your changes after a hacking session; etc.
Comment 1 Dominik Haumann 2012-11-27 08:07:04 UTC
A valid wish, and easy to implement. The jumping would be analog to bookmarks, i.e. not chronologically in time, but in text lines.
Comment 2 Dominik Haumann 2014-02-10 22:35:32 UTC
Proposed patch for KDE Framworks 5: https://git.reviewboard.kde.org/r/115633/
Comment 3 MountainX 2014-02-11 01:46:08 UTC
Glad to see the proposed patch!
Comment 4 Dominik Haumann 2014-02-19 20:53:01 UTC
Git commit 6d3b2f62d409b990ecf45733f0710d78c21a4a36 by Dominik Haumann.
Committed on 19/02/2014 at 20:49.
Pushed by dhaumann into branch 'master'.

Feature: Jump to next/previous change

Currently, no shortcut is assigned. Any suggestions?
REVIEW: 115633

M  +9    -5    src/data/katepartui.rc
M  +15   -0    src/document/katedocument.cpp
M  +3    -0    src/document/katedocument.h
M  +32   -0    src/view/kateview.cpp
M  +2    -0    src/view/kateview.h

http://commits.kde.org/ktexteditor/6d3b2f62d409b990ecf45733f0710d78c21a4a36
Comment 5 Dominik Haumann 2014-02-19 21:31:52 UTC
Git commit 8c2f4bb0eb33ac3b1b05b3148b9f8f722612c904 by Dominik Haumann.
Committed on 19/02/2014 at 21:29.
Pushed by dhaumann into branch 'master'.

Feature: Jump to next/previous change

Currently, these two actions are now directly in the Edit menu:
- Move to Previous Modified Line
- Move to Next Modified Line
- Go To...

Is that ok for 4.x, or do you want it all in a "Go To" submenu?
CCMAIL: kwrite-devel@kde.org

By default, no shortcuts are assigned.

FIXED-IN: 4.13

M  +3    -1    part/data/katepartui.rc
M  +15   -0    part/document/katedocument.cpp
M  +3    -0    part/document/katedocument.h
M  +32   -0    part/view/kateview.cpp
M  +2    -0    part/view/kateview.h

http://commits.kde.org/kate/8c2f4bb0eb33ac3b1b05b3148b9f8f722612c904
Comment 6 MountainX 2014-02-20 01:22:45 UTC
(In reply to comment #5)
> Feature: Jump to next/previous change
> 
> Currently, these two actions are now directly in the Edit menu:
> - Move to Previous Modified Line
> - Move to Next Modified Line
> - Go To...
> 
> Is that ok for 4.x, or do you want it all in a "Go To" submenu?

That menu layout sounds good to me. I am personally not in favor of a "Go To" submenu.


> By default, no shortcuts are assigned.

Thinking of appropriate shortcuts isn't as easy as it would seem!
What about these?
CTRL-[ for jump to next modified line (that's control + open square bracket)
CTRL-] for jump to prior modified line

As far as I can tell, those are not used. And they seem fitting as well as easy to remember for this action. That's just my 2 cents.

Thanks!
Comment 7 rjwgnr27 2014-02-21 20:30:46 UTC
This works really nice, I have been using it for a couple days. I think though, that it would be more useful to jump to the next group of changes, not the next change.

So if lines 10,11,12 and 100,101, and 102 are changed, from line 11, the jump to next would be 100. From 101, the jump to previous would be 12 (or should it be 10, the top of the previous block?).

Again, thank you for the work, it's a big help.
Comment 8 MountainX 2014-02-21 20:34:34 UTC
(In reply to comment #7)
> This works really nice, I have been using it for a couple days. I think
> though, that it would be more useful to jump to the next group of changes,
> not the next change.
> 
> So if lines 10,11,12 and 100,101, and 102 are changed, from line 11, the
> jump to next would be 100. From 101, the jump to previous would be 12 (or
> should it be 10, the top of the previous block?).
> 
> Again, thank you for the work, it's a big help.

I agree with all that. 

There was also a related discussion with Dominik on this topic here: https://unix.stackexchange.com/questions/66261/kate-editor-how-to-jump-to-modified-lines
Comment 9 Dominik Haumann 2014-02-21 22:37:16 UTC
Well, jumping to the previous block might be an option. I'll have a look into this when I find the time. Meanwhile, if you want, you can try to patch the code yourself and attach a patch? :-)