Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11086
    urlwolf
    Member

    typewriter mode comes from those full-screen writer editors… It’s handy on text editors too (like sublime).

    It makes the editing line centered, so the eyes can rest on a more natural position.

    #11089
    Stefan
    Participant

    .

    Do you mean the behaviour reachable by F11 key?

    EmEditor Home – EmEditor Help – Command Reference – View category
    Full Screen command

    Description
    Toggles the full screen mode.

    How to Run
    Default Menu: View > Full Screen
    All Commands: View > Full Screen
    Toolbar:
    Status Bar: None
    Default Shortcut Key: F11

    .

    #11091
    urlwolf
    Member

    No, it’s not about the screen, bars, etc…
    It’s about how text scroll.
    The insert point (cursor) is always at the center of the screen.

    #11095
    Stefan
    Participant

     

    That sounds like an automatically scrolling feature.

    Isn’t that disturbing?

    I think I have never seen this feature in EmEditor.

    There are only this shortcuts

    Alt+PageUp – move cursor at top of screen
    CTRL+UP ARROW – Scrolls the document up by one line

    Hmm, but from that we can create an script
    to move line with cursor into horizontal mid of screen:



    ////scroll line with cursor in horizontal mid screen
    yPosCurr = document.selection.GetActivePointY( eePosView );
    xPos = document.selection.GetActivePointX( eePosView );
    editor.ExecuteCommandByID(4292); //Moves the cursor to the top of the current window.
    yPosTop = document.selection.GetActivePointY( eePosView );
    editor.ExecuteCommandByID(4293); //Moves the cursor to the bottom of the window
    yPosBot = document.selection.GetActivePointY( eePosView );
    yPosMid = parseInt(yPosTop + ((yPosBot - yPosTop) / 2) );
    iDiff = parseInt( (yPosBot - yPosTop) / 2 );
    if(yPosCurr < yPosTop){ iDiff += (yPosTop - yPosCurr);}
    if(yPosCurr > yPosBot){ iDiff += (yPosCurr - yPosBot);}
    if(yPosCurr > yPosMid){
    for( i=1; i < iDiff; i++){
    // Scrolls the document down by one line.
    editor.ExecuteCommandByID(4171);
    }
    }else{
    for( i=1; i < iDiff; i++){
    // Scrolls the document up by one line
    editor.ExecuteCommandByID(4170);
    }
    }
    document.selection.SetActivePoint( eePosView, xPos, yPosCurr, false );

    Hmm, that script is a nice feature. Could use this myself often.

    But not what you are after, I understood.

    I have added Ctrl+Alt+M to that script,
    and now, whenever I had scrolled my cursor line
    out of view, this will bring the line back to mid screen.
    Nifty, thanks for idea :-D

    Now I can leave the cursor in the current line and use the
    scroll bar to go to another place in the document to spot
    some information, then pressing Ctrl+Alt+M scrolls back to
    the line with the cursor.

    I wonder if this is not already implemented? I go RTFM again…

    .

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