Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #10217
    ldm
    Participant

    Hello All,

    Many times I feel that I need a “Jump to a Previous View” feature – one like we have in the Adobe Acrobat.

    Is it possible to implement this feature please?

    It will be very useful to have a GoBack/GoForward Jusmps as well (lt’s say with a history of 10 last jumps or even more)

    Thank you!

    #10222
    Yutaka Emura
    Keymaster

    I am not sure exactly what you would like, but in the Projects plug-in, you can press F12 to jump to the function at the cursor, and then Ctrl + * to go back to the previous position.

    #10232
    ldm
    Participant

    Ok, I’m exactly what you wrote about, but not only for the function jumps – for rest of the cases as well.
    For example, when I click on the item in the Outline plugin sidebar, my cursor jumps to a new position (jumps some code). So, it would be very useful to have a keyboard shortcut, which would allow to jump the cursor back to it previous position. Many other scenarios might be involved as well.
    Is it difficult to implement such feature?
    Thank you!

    #10236
    Yutaka Emura
    Keymaster

    The Move to Last Edited Position command (Edit > Advanced) will jump to the last cursor position. The default shortcut key for this command is Ctrl + Shift + Z. I hope this helps.

    Thanks!

    #10239
    ldm
    Participant

    Yutaka,

    Thank you for the tip! This is in case of editing… But what’s about just viewing/navigation through the code? Is it difficult to keep a history of the cursor position (let’s say 10 positions back) or just a position of the text related to the main text window?

    BTW, as for the Markers, can they be generated automatically?

    Thank you!

    #10245
    Yutaka Emura
    Keymaster

    It is possible to keep 10 or more cursor position history unless the document is edited. What do you mean by generating bookmarks automatically.

    Thanks!

    #10249
    ldm
    Participant

    Okay, if you can implement the 10 or more cursor position history of the cursor, you would not need an automatic generating of the bookmarks.
    An automatic generating of the bookmarks is very similar to the page number of the code. The code is virtually divided to the pages (a code portion, which is fitted to the actual size of the main window). This allow jumping not just to the line number, but to the page number as well (might be useful in large files). When the Main Window is re-sized, then the so-called page-bookmarks are re-generated. I don’t know how it’s difficult to implement such feature …
    But, as for the cursor history 10 positions backward and forward, would you like to implement this feature. It could be very useful for the code navigation.
    Thank you!

    #11037
    Stefan
    Participant

     

    I was also searching for enhancement
    of the “Move to Last Edited Position” function.

    If possible I would like to have the possibility
    to cycle through the last ten* lines
    where a modification were made.

    If I reach the tenth (or just last in list) modified line,
    the next using of this command will turn around
    to the most recent modified line.

    * maybe configurable?

    Thanks.

    #11038
    Meir
    Participant

    I also vote for such an enhancement!

    My model is the browser’s ALT-Left/Right arrow to go backward and forward to previous positions. Exact column positions is less, or not at all important. In fact, I would rather not “waste” edit points on “micro” positions, say on the same line. What I need is “macro” jumps to code segments “under construction”.

    As for edited out positions, a line above the original (or below) is fine with me.

    #11079
    Stefan
    Participant

    .

    Yutaka pointed me to the right direction. Thanks Yutaka!

    Stefan:
    ** Navigation: GoBack/GoForward in edit history is missed.

    Yutaka wrote:

    Back and Forward commands are already included in EmEditor.
    You can display these commands as the Toolbar, and also you can
    use the default shortcut keys (ALT + LEFT and ALT + RIGHT).

    I have searched the help and found this:

    EmEditor Home – EmEditor Help – Command Reference – Edit category > Forward command
    Description: Moves the cursor to the next position.
    Default Keyboard Shortcut: ALT + RIGHT

    EmEditor Home – EmEditor Help – Command Reference – Edit category > Back command
    Description: Moves the cursor to the previous position.
    Default Keyboard Shortcut: ALT + LEFT

    I don’t had this shortcuts assigned?!
    I think it is because I only update
    with new files but still use my old settings?

    Anyway, I have now assigned shortcut keys my own and tested this feature.

    So long I have found:

    1) I miss a gui to preview the last line numbers and line text.

    2) Also I miss a visible indicator to see the cursor after moving.

    3) Next I am not sure if I like that this feature works global
    for all open documents instead of the current working doc only.

    For my first two points I have created a script
    (based on “build-in” snippet “Clipboard History” to help my self:


    //Moves the cursor to the previous position.
    //Script to collect the last ten positions and provide a menu to go there.
    //Based on Yutakas' snippet "Clipboard History"
    // NOTE: THIS DOES NOT WORK reliable yet, I have to investigate more.
    menu = CreatePopupMenu();
    i = 0;
    LastLinesArray = [];
    do {
    editor.ExecuteCommandByID(4597);//Moves cursor to prev pos.
    yPos = document.selection.GetActivePointY( eePosLogical );
    LastLinesArray[i] = yPos;
    str = document.GetLine( yPos );
    str = str.substr( 0, 40 );
    menu.Add( yPos + ':t' + str, i + 100 );
    i++;
    } while( i < 11 );

    result = menu.Track( 0 );
    if( result != 0 ) {
    yPos = LastLinesArray[result -100];
    document.selection.SetActivePoint( eePosLogical, 1, yPos );
    document.selection.WordRight( 1 ); //visible indicator only
    }

    But it doesn’t work 100\% correctly.

    ** for each call it provides other (elders?) results
    ** it jumps between open documents
    ** I don’t know how far back the history goes
    and what the script will do if I call an empty entry.
    ** I jumps only backwards, forwards is not implemented yet in my script.

    More research to do ;-)

    .

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.