Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4487
    Robby
    Member

    Hi, I used to be a CodeWright user for years, but it was to big and hence I switched to EmEditor.

    Anyway, CW had a nice feature I’m missing: I could copy a whole line without marking by just using CTRL+INS / CTRL+C.

    Would be nice if this feature is added to EmEditor as well.

    #4489
    Yutaka Emura
    Keymaster

    You can use the following macro (JavaScript):


    if( document.selection.IsEmpty ){
    editor.ExecuteCommandByID(4192);
    }
    else {
    document.selection.Copy(eeCopyUnicode);
    }

    and you can assign this macro as CTRL+INS and CTRL+C.

    #4598
    Robby
    Member

    How can I assign a macro to a key combination? I didn’t find this information in the docs.

    Ok, found it. In the keymap there is a selection called “My Macros” where one can find the macros that were made known to EmEditor via Macros/Customize. [BTW: The process is a bit awkward]

    The code isn’t perfect because the result for insert depends on where the cursor is located at the time the copy happens.

    I want the insert to always insert the copied line as a complete new line. Does it help to add a NL/CR at the beginning and end of the copied line?

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