- Open VS Code.
- Click on File.
- Then find Preferences -> settings.
- Click on the Text Editor in the left side menu.
- Locate the Smart Select Select Leading And Trailing Whitespace Setting.
- Check or uncheck: Whether leading and trailing whitespace should always be selected.