Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22537
    Patrick C
    Participant

    Dear Yutaka,

    Regarding your new version announcement
    http://www.emeditor.com/text-editor-features/history/new-in-version-17-2/

    The new feature:

    The new version will not delete spaces at the current cursor line when the Delete Spaces at End of Lines command is used.

    is a real setback for me when virtual space is enabled.
    Can you please add an option to delete spaces at the current cursor line as well. I would highly appreciate this as my use of virtual space makes this is a frequent scenario. So frequent that I truly love this feature, which is now broken in Version 17.2.

    Best regards,
    Patrick

    #22541
    Yutaka Emura
    Keymaster

    Hello,

    I will make this feature as an option on the next version.

    Actually, this feature will be enabled only when the Delete Spaces at End of Lines check box is set in the Save Details dialog box. The Delete Spaces at End of Lines command will NOT be affected on the next version. Does this work for you?

    Thanks,

    #22544
    Patrick C
    Participant

    Not really as I just used to hit ctrl+s to both trim and save.

    However I’ve just written a macro and assigned ctrl+s to achieve the same effect:

    document.selection.Replace( "[ \t]+$", "", eeFindReplaceRegExp + eeReplaceAll );
    editor.ExecuteCommandByID(4099);

    So if its too much trouble for you, I can stick with the macro as an alternative solution.

    #22555
    Patrick C
    Participant

    Just tested and implemented in my save macro – Version 17.2.1 now trims the cursor’s line when using the Delete Spaces at End of Lines command :)
    For large files this is much more efficient than document.selection.Replace( “[ \t]+$”, “”, eeFindReplaceRegExp + eeReplaceAll );
    (tested with a 100 MB file having 2 million lines).

    My save macro now is

    editor.ExecuteCommandByID(4278);         // Delete Spaces at End of Lines command
    editor.ExecuteCommandByID(4099);

    I think this is a good compromise solution.
    Thank you Yutaka!

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