How do you record a macro to remove trailing whitespace from lines?
Answer
qa:s/\s\+$//e\n jq
Explanation
Record a macro that runs a substitution on the current line to remove trailing spaces, then moves down. Repeat across all lines.
qa:s/\s\+$//e\n jq
Record a macro that runs a substitution on the current line to remove trailing spaces, then moves down. Repeat across all lines.