Remove trailing spaces in active file.
Section: Editor Editing
Trim trailing whitespace
text
text
Windows/Linux: Ctrl+K Ctrl+X
macOS: Cmd+K Cmd+XLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Editor Editing