- Open VS Code.
- Click on File.
- Then find Preferences -> settings.
- Click on the Text Editor in the left side menu.
- Then Click on Diff Editor.
- Locate the Ignore Trim Whitespace Setting.
- Check or Uncheck: When enabled, the diff editor ignores changes in leading or trailing whitespace.