Basically, this provides read-mode and edit-mode for local development!

Start by installing CSharpier: https://csharpier.com/

dotnet tool install csharpier -g

Switch to Read Mode

  1. Format code for reading: dotnet csharpier .
  2. Read the code until you decide to make a change to it.

Switch to Write Mode

  1. Reset all the formatting: git reset --hard HEAD
  2. Make the code changes.
  3. Commit the code changes: git commit -m <some message>.
  4. Switch back to Read Mode.

This helps because:

  • it meets my need for reading short lines, and
  • it meets others' legitimate needs for minimal changes to the code base.

Win-win!