Skip to content

Instantly share code, notes, and snippets.

@hmaarrfk
hmaarrfk / matlab_remove_trailing_whitespace
Last active April 1, 2021 19:48
To remove a Matlab trailing whitespace in the editorOriginal Author: Sam Roberts http://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlabModified by Mark Harfouche to remember cursor location
% To remove a Matlab trailing whitespace in the editor
% Original Author: Sam Roberts
% Improved by: Simone Gaiarin <[email protected]>
% http://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlab
% Modified by Mark Harfouche to remember cursor location
%
%
% Temp variable for shortcut. Give it an unusual name so it's unlikely to
% conflict with anything in the workspace.
shtcutwh__ = struct;