Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Feature request: navigate to last edit location

Open liangjiancang opened this issue 2 years ago • 11 comments

  1. navigate to the last edit location for reference: navigate-to-last-edit-location, last-edited-location
  2. navigate to previous/next change (history marker)

liangjiancang avatar Feb 05 '23 07:02 liangjiancang

Due to the lack of Keyboard-Shortcuts, maybe a kind of "mode-switch" between "navigate to bookmarks" vs. "navigate between change-history" would be necessary to reuse the <Modifier>-F2 shurtcuts 🤔

RaiKoHoff avatar Feb 06 '23 13:02 RaiKoHoff

There is some overlap between bookmarks and change history, but in general they can't replace each other, I use both of them at the same time in my daily use. If possible, I would like to solve this with a no-reuse <Modifier>-F2 solution.

If not, I would suggest two modes:

  1. navigate to bookmarks only
  2. navigate to bookmarks and history changes

And provide a shortcut to switch between modes (e.g. Ctrl+Shift+F2).

liangjiancang avatar Feb 06 '23 14:02 liangjiancang

With PR #4567 I tried to find a compromise for Part 2) of this request: No switch for F2-Mode, but relying on the already used bookmark navigate feature: If current line has already a bookmark-type (there are more bookmark types with the focused-view feature), F2 (next) and Shift+F2 (prev) try to navigate to next resp. previous bookmark of the same type (incl. wrap-around). Now change-history-marks are included in this navigation. Hope that helps a little bit.

(There is no easy way to navigate to e.g. "most-recent-change", except undo+redo operation.)

RaiKoHoff avatar Feb 23 '23 18:02 RaiKoHoff

Hello @liangjiancang ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.23.223.1_beta.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.23.223.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Feb 23 '23 23:02 hpwamr

  1. Successive changed lines should be considered as the same change, at least for the navigation, because it does not make sense to jump between two successive lines.
  2. include change-history-marks in focused-view (when nothing is marked).

liangjiancang avatar Feb 27 '23 02:02 liangjiancang

Hello @liangjiancang ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.23.228.1_beta.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.23.228.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Feb 28 '23 18:02 hpwamr

There are two small things.

Assume that lines 4, 5, 6, 12 and 18 are changed.

  1. F2 does not work when cursor is on line 19, 20, ... Shift+F2 does not work when cursor is on line 2 & 3 (strange that it is OK on line 1).
  2. Shift+F2 makes the cursor navigate between lines 18, 12 and 6, but it's better to navigate between line 18, 12 and 4.

liangjiancang avatar Mar 01 '23 02:03 liangjiancang

Hello @liangjiancang

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.23.302.1_beta.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.23.302.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Mar 02 '23 14:03 hpwamr

If current line has already a bookmark-type (there are more bookmark types with the focused-view feature), F2 (next) and Shift+F2 (prev) try to navigate to next resp. previous bookmark of the same type (incl. wrap-around).

If a line is changed and bookmarked, F2 navigates to the next change-history-mark now. It should navigate to the next bookmark, because bookmark should have a higher priority than change-history-mark.

liangjiancang avatar Mar 24 '23 01:03 liangjiancang

PR #4695 has some optimization: Book-Marker are preferred over Change-Marker, except: If position (line) of last found marker has not changed, next search (next or prev, F2 / Shift+F2) searches for marker of previously used marker type. So a consecutive search for change-marker is not interrupted by a high prio bookmark on change-marker position. Even not if the position is bookmarked during change-marker search. If the position (line) changed in between, a position having bookmark & change-mark, next search is for bookmarker.

RaiKoHoff avatar Mar 24 '23 12:03 RaiKoHoff

Hello @liangjiancang ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.23.325.1_beta.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.23.325.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Mar 25 '23 18:03 hpwamr