Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martincr/34f4fa08f6924512487d5b683c4fe800 to your computer and use it in GitHub Desktop.
Save martincr/34f4fa08f6924512487d5b683c4fe800 to your computer and use it in GitHub Desktop.
1. Find > Replace
2. Click 'Regular Expression' box
3. Enter ^\s+ as your search string
4. Click 'Find' to confirm it works as anticipated
5. Use 'Replace All' to remove all leading spaces from each newline
NB. For trailing spaces replace with \s+$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment