SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Features and/or Improvements => Topic started by: jporkkahtc on February 02, 2019, 05:55:33 PM

Title: Recent Edits
Post by: jporkkahtc on February 02, 2019, 05:55:33 PM
In Slickedit, and other editors too, I often use UNDO as a quick way to return to the location in a file that I'm currently editing.
For example: I'm reading something at around line 500 in a file and realize I need to take a peek at something near the top of the file.
I tap <spacebar>, then Ctrl+Home.

I return to my previous location by hitting Ctrl+Z.


What I'd like: A way to navigate next/prev through the locations in a file that I have changed - without actually any undo/redos.

Of course, it shouldn't be super fine grained - like I don't need to see the cursor move through each character that I typed....maybe have a granularity of several lines: If I changed lines 10,11,14,100,150,200
The slick would let me cycle thru 4 locations [ (10-14), 100, 150, 200 ]

The order that I made changes should not matter - Slick could sort these locations by line number, and next/prev would be relative to the current cursor location.
Title: Re: Recent Edits
Post by: Dan on February 02, 2019, 05:58:57 PM
Have you tried File>Backup history, or is this overkill for what you want?
Title: Re: Recent Edits
Post by: jporkkahtc on February 02, 2019, 06:02:38 PM
Yeah, I'm just looking to move the cursor between the locations in a file that I'm editing.
Maybe think of this as a different kind of bookmark.
Title: Re: Recent Edits
Post by: Graeme on February 02, 2019, 09:09:25 PM
This is what xretrace does.  I would be lost without it.

https://community.slickedit.com/index.php/topic,16598.0.html (https://community.slickedit.com/index.php/topic,16598.0.html)

[Edit] I would be keen for slickedit to implement this in the core.  It's less than perfect at detecting insertions and deletions.
Title: Re: Recent Edits
Post by: Graeme on February 02, 2019, 10:39:42 PM
Also, it's fairly easy to write a macro the goes to the next modified line using the _lineflags function.  By default, _save_file doesn't clear line modified flags  - xretrace does clear them though.