- October 19, 2017 at 12:19 am #22537
Regarding your new version announcement
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.
PatrickOctober 19, 2017 at 12:08 pm #22541
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,October 19, 2017 at 12:43 pm #22544
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.October 21, 2017 at 6:51 am #22555
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!
You must be logged in to reply to this topic.