Forked from martincr/Trim leading spaces in Sublime Text 3 using regular expressions
Created
July 9, 2022 06:39
-
-
Save eshrinivasan/0be802bdef4d6973a5d41611e78b6ee6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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