Author Topic: Go To Last Change --- AutoBookmark  (Read 1855 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Go To Last Change --- AutoBookmark
« on: April 01, 2009, 11:40:42 am »
I like "Navigation > Go to the last change"

But often my last change (the one i think they are) is the second last

f.ex.  i think the last change was on line 23
but i am on line 678
and my really last change was on line 677
.... so the one on line 23 was my second last change. *trapped* :D

So my question is:
can you at easy add an option to store , lets say, the last 9 changed lines?

I think of an kind of auto bookmark option, like:

i press an shortcut or choose an menu item
this opens an dialog with the last 9 line number where i made an modification,
including lets say the first 50 chars of this lines.

Example:

Mark -Line- line content
1      -678-   If CInt(tmp) > CInt(max) Then
2      -677-   tmp = ws.regread (key)
3      -003-   Dim  tmp, max
4      -012-   max = 100

so i would press the keyboard number-key or click the line in the dialog i want to go.

What do you think?
Easy to implement and from interest, or to much work?
Stefan, HippoEDIT beta tester  (HippoEDIT News On Twitter: http://twitter.com/hippoedit/)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #1 on: April 01, 2009, 01:38:38 pm »
Hi Stefan,

Yes. Idea is good. And not complex to implement. Only change to remember not one last change but more.
But there are also problems. What to do if you have done change, then have deleted that area, than have deleted area once more and paste something on top...

Where are your last changes? ;)

As UI interface, you can check Show Bookmark list command (you need more then one bookmark in a document).

I would think what is possible...

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #2 on: April 01, 2009, 08:59:04 pm »
Another possibility to use Edit.NavigateForward (Fo to Next position) and Edit.NavigateBackward (Go to Previous position).
This is not the same as you have mentioned with last changes, but in some cases would be the same ;) If you have not moved cursor too far from changed position :)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #3 on: April 01, 2009, 09:13:58 pm »
And one more idea.

What be even easier (because does not require to recalculate chnage positions after every every change) is to do navigation between changed LINES (better to say regions). Usually you do not have too much of them and I think this is better. Also menu list can be done.

Another problem really with changed positions (taking the list in mind), is that for example if yoy change same line, after every character, you would get a changed position so very soon you would have all your 9 positions on same line. Would this help? Do not think so.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Go To Last Change --- AutoBookmark
« Reply #4 on: April 01, 2009, 09:35:58 pm »
Yes, changed lines would be enough.
Sorry, had not think and clarify enough.


I didn't need changed detail ( would be nifty? too?... but not really needed i think)
Normal i know what i had modified,   i think  it' s  just  to  find  the line again.


> after every character, you would get a changed position so very soon you would have all your 9 positions on same line
You are right!



--
Trying "Edit.NavigateXXX" it's not as accurate as needed as i see with first tests. But i have to try more!


--------

> What to do if you have done change, then have deleted that area,
I see, there is more then just an quick idea :-(  :D

I think all action is an change?
- type an char => auto bookmark this line
- delete an char => auto bookmark this line
- delete an line => auto bookmark line ( maybe i want jump back to this line to paste something in)
- pasting => auto bookmark line

Yes, i f i do much .... i quickly fill up the list... but that's O.K.  i think?

An longer list didn't make sense, but maybe 20 items would be an compromise to be on the secure side?
...
« Last Edit: April 01, 2009, 09:58:25 pm by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #5 on: April 01, 2009, 10:34:29 pm »
Actually the idea was a little bit different...

The problem with changed line list (or points), that it should be recalculated every time you have changed text before, because you need to shift line numbers up or down dependently if you have deleted line or inserted.

My idea was more simple, and easy to implement to me. But maybe more suitable for the purpose you have mentioned.
When you change a line, it already gets a changed indicator. And what was easy to do is go to next chnaged lines block or to previous changed lines block. So list would be sorted not by history of chnage but by position in document...

Just one more idea. You can enable overview flag for changed lines (or saved) in fonts and colors and then it would be possible to jump between them by clicking in overview bar.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Go To Last Change --- AutoBookmark
« Reply #6 on: April 02, 2009, 04:40:30 pm »
-
As far as i understand you mean
no list of history like
Line  12
Line    5
Line 123
Line    7

but just list of changed lines like
   5
   7
  12
123

yes?

I think if we could have start of line content also it would be fine.
   5 Dim
   7 Set x
  12 IF i = e
123 'comment



OR do we need an list/dialog/window at all?
Isn't it enough just to jump around to the last 9 modified lines in an circle?
Like Ctrl+F3 for word-under-cursor.


Perhaps "Go to the last change" should cycle thru the last changed lines.
Maybe you can provide an option in XML file to set the amount of remembered lines?
So user can set it to "2" to use this just as toggle between two lines
or set it to "5" to cycle thru the last 5 modified lines.


EDIT
Just discovered the bookmark panel again (View>Panes>) and just think, why add another feature?
Perhaps it's an idea to make  really an auto-bookmark option, by adding automatically an bookmark
for an modified line and remove the very first one if i need more then ten.
But maybe this disturb people who want to use bookmarks too as addition.
/EDIT


We should think more about this  before you do all the work.
(And i should use much more split window option)

-


> You can enable overview flag for changed lines (or saved) in fonts and colors
I am start testing this.
But soon all lines are marked, not only the last once.

But i see the mark color on the left side (by the numbers) ?
I think (as i see if i enable/disable Overview-bar) this bar is on the right? Here i see nothing on the right. (with vbs syntax)
Or did i mixed up all again :-(

EDIT
Overview bar is on the right side. And at home i see there small colored marks.
/EDIT
-------
btw
what for is this little blue arrow on the bookmark line? It point to an kind of anchor. ( aha, it points where SmartNav goes to :D )
« Last Edit: April 02, 2009, 08:55:25 pm by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #7 on: April 02, 2009, 10:28:09 pm »
Hi Stefan,

the easiest for me would be :
   5 Dim
   7 Set x
  12 IF i = e
123 'comment

creating of the menu for it is not a problem. But here would be not a limitation but all chnaged intervals.
Interval mean that if you have changed line 5,6,7,8 it would be a one interval from 5-8 (I can also show first and last line of interval, HE supports multiline menues).

In case of using intervals, their amount would be much less then remembering only changed line. And it would also work if you would change a standalone line, just interval would be 1 line length.

And in addition there should be commands go to next change interval (block) or previous.

I do not want to mix this functionality with bookmarks, because it has another context from my point of view.

Small blue line used in all cases when you do navigation in the code (find, go to position, smart navigate), to help you keep your eyes on position even then you have moved with a cursor. (also there is a small triangle directly in text, for same purpose).

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Go To Last Change --- AutoBookmark
« Reply #8 on: April 03, 2009, 07:56:45 am »
Hi Alex and all,


I see no problems with using intervals

   5/7       Dim x,e,f  [...] strInput
   7          Set x = New Instance
  12/16    IF i = e > f then [...] End If
123         'comment



Line(s) per interval:
I think showing one line per interval would be enough (not showing first and last line).
Maybe like folding block:  "Startline xyz ... abc Endline" ?
Or the first line from interval.



Menu: 
same as the Bookmark-list in lower pane? For easy access. Just to click on line to goto in doc.


Configurable amount:
Configurable amount of remembered lines as setting in XML file?
For menu it is no problem to have many items.
But for keyboard shortcut it may be nifty to set amount of items to two or three only.
If we didn't get this setting option, what should be the max amount? I think 9 or 10 would be enough.
If we had more.... we would search the list like we can search the doc too instead.


Keyboard shortcut:
Option to assign Keyboard shortcut:  goto nex/prev  modified line
( in same column as cursor is currently?   or pos1 ?   I would prefer the first.)



Did i forget something Arthur?

Offline Arthur

  • Hero Member
  • *****
  • Posts: 620
  • Karma: +1/-0
  • He who is ashamed of asking is afraid of learning.
    • View Profile
    • My Blog
Re: Go To Last Change --- AutoBookmark
« Reply #9 on: April 03, 2009, 03:55:55 pm »
Thinking can be done similarly to the Clipboard Ring. Looks complete Stefan, yes, and I remember asking to remember multiple changes. Smart Navigate looks depreciated though in this scenario IMHO.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Go To Last Change --- AutoBookmark
« Reply #10 on: April 11, 2009, 11:41:30 am »
HippoEDIT 1.42 Beta Version 649  (09.04.2009):

    * New. Changed areas navigation.
                New commands added for navigation between changed areas:
                - Edit.NextChangedArea,
                - Edit.PreviousChangedArea,
                - Edit.ListChangedArea.
                Approprtiate menu entries added to Navigation menu.

Feature Video: http://www.youtube.com/watch?v=waFFKu4fVb8

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #11 on: April 15, 2009, 12:45:52 am »
Hello Stefan,

thanks a lot for perfect screencast! Just have a time to check it.
Your help into Hippoedit is really valuable.

Best regards,
Alex.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Go To Last Change --- AutoBookmark
« Reply #12 on: July 26, 2010, 09:33:16 am »
Hi Alex, ... question:

I don't know if it was always like this --- or if i do now save more often my work...
But i discover some times ago that after saving the document the "Changed Areas List" is emptied ?!
Making it a bit less useful now for me.

Question: was this as intended/implemented?
Can you save this CAL?  I think we have already an file with such info about recently changes wheres this could fit in?
At least maybe store it as long as HE runs?

What do you think?

Best regards

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Go To Last Change --- AutoBookmark
« Reply #13 on: July 26, 2010, 09:19:34 pm »
Hi Stefan,

that was always in such way. So implemented like this.
This information was never saved in file satellites and generally this is rather problematic: then HE need to merge changes from all sessions, and this would be mostly everything in the end :) Right for this, just simply use any CVS (as Perforce fex).

But maybe you are right and it make sense to show not only last changes, but also saved modifications. This can be done without big effort, I will notice this for todo for next beta. But such modification markers will be only persistent for same HE session.

Best regards,
Alex.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Go To Last Change --- AutoBookmark
« Reply #14 on: July 26, 2010, 10:41:15 pm »
Uh, yes, saving all changes would be too much.
For me i think it is only as long as i have HE open and running ( same as your "same session"-term ? )
- if i save an modification i still want to go to one of the last ChangedAreas.
- if i close the file this info can be dropped.
- OK, i can imagine that it would be nice to keep this info as long as HE is running, so if this could be it would be extra fine.
- To have this info for even longer can be problematic, as i see now from your response.
(on the other hand: i think you have limited this CAL-info anyway to some value... so it would be no matter if you collect this CAL over several sessions...: the oldest are dropped anyway. IIRC. But i think we didn't need this extra effort.)

Thanks.

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
635 Views
Last post April 01, 2009, 08:48:24 pm
by alex
10 Replies
1207 Views
Last post April 23, 2009, 04:58:57 pm
by Chuck
3 Replies
382 Views
Last post September 02, 2009, 09:10:11 pm
by alex
2 Replies
640 Views
Last post July 02, 2010, 07:54:55 pm
by alex
1 Replies
171 Views
Last post July 30, 2010, 08:37:34 pm
by alex