Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jmrnilsson/540c77c86a3f9a38b08e589170734666 to your computer and use it in GitHub Desktop.
Save jmrnilsson/540c77c86a3f9a38b08e589170734666 to your computer and use it in GitHub Desktop.
Switching from mixed space-tab intent to tab indentation in visual studio professional (2017)

Regex indentation and line-endings tricks

Switching to tab indentation

Note: Has to be run multiple times until it will not match anything. Has been verified in Visual Studio Professional 2017.15.7

  • Search RegularExpression (?<=(^[\t]*))[ ]{4}.
  • Replace with \t.
  • File mask *.cs.

Trim trailing non-breaking whitespaces

Note: Run once. Has been verified in Visual Studio Professional 2017.15.7

  • Search RegularExpression [ ]+$.
  • Replace with empty string.
  • File mask *.cs.
@jmrnilsson
Copy link
Author

jmrnilsson commented Dec 21, 2018

Check if a Console.App can be used for linting this with pipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment